Elestia Open Source Ratings
6.6

chroma.js

Reasonable, with limits. 4th of 7 color libraries.

chroma.js is a mature, dependency-free color library with a strong API for color scales, palettes and interpolation. It remains a good choice for data visualization. Its types ship separately, it does not tree-shake well, and its wide-gamut support is thinner than Culori's or Color.js's. For general modern CSS color work, those two peers are now the stronger picks.

Best for: Data-visualization projects that need color scales, ColorBrewer palettes and perceptual interpolation with a simple chainable API.

WebsiteGitHubnpm

Scores

Overall6.6

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

chroma.js is still a good, safe pick for data-visualization color scales, where its API is among the best. For a new general-purpose project, Culori offers modern color spaces, tree-shaking and faster growth, and Color.js offers the most complete CSS Color 4 coverage. Its maintenance is steady but slow, and it is losing share.

GPT-6.2 Sol: 7.2, likely 6.2 to 8.2

chroma.js is a strong choice when palettes and data-driven scales are central to the project. For new work centered on wide-gamut CSS colors, Color.js and Culori cover more of the job. Version 3.3.0 fixes meaningful bugs, and the long wait for an already-merged import fix limits confidence in the release cadence. Below-baseline download growth also tempers the recommendation.

Needed by many4.8

How many developers need a tool for this job?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

Many front-end developers need to parse or convert colors at some point, but far fewer need a dedicated library. chroma.js's strength in scales and palettes speaks mostly to data-visualization and design-tool work. It runs on any runtime.

GPT-6.2 Sol: 4.6, likely 3.5 to 5.8

Programmatic color work comes up in design tools, theming, charts, and maps. Native CSS covers routine browser-side mixing, so chroma.js is most useful when JavaScript needs to generate palettes or compute colors from data. The available survey describes color pain points and gives little indication of how many teams need a library.

Helps a lot7.1

How well does it do the job for those who need it?

Claude Opus 5.5: 6.5, likely 5.5 to 7.5

Parsing, conversion, mixing and especially scale generation are solid and well documented. v3 added OKLab/OKLCH and modern CSS output, and v3.3 fixed interpolation edge cases. It loses ground to Culori and Color.js because it lacks bundled types, tree-shaking, wide-gamut spaces and gamut mapping.

GPT-6.2 Sol: 7.7, likely 6.7 to 8.7

The scale API combines perceptual mixing, lightness correction, and class breaks, and runnable examples give developers and coding agents patterns to follow. Version 3.3.0 fixes several interpolation and alpha errors. Separate TypeScript declarations and limited CSS syntax add friction, and Color.js offers stronger gamut handling. A benchmark of 3.2.0 found conversion close to Culori and slower parsing on most tested inputs, so current performance remains less certain.

Holds up over time6.3

Will it still be a good choice in two years?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

The project is alive: 35 commits and 3 releases in the last year, the latest on 2026-11-09, and a Scorecard Maintained score of 10. It still depends largely on one original author. A year passed between v3.2.0 and v3.3.0, and 23 pull requests are open. The ecosystem's move toward Culori and Color.js for modern CSS color is a slow headwind.

  • github commitsLastYear / releasesLastYear: 35 commits and 3 releases in the last year
  • github openPullRequests: 23 open pull requests against 99 merged
  • github.com/gka/chroma.js/releases: v3.2.0 in late November, v3.3.0 in November 2026
  • scorecard Maintained: Scores 10

GPT-6.2 Sol: 6.5, likely 5.2 to 7.7

The project recorded 35 commits and three releases in the past year, and several contributors helped fix bugs in 3.3.0. The light-build ESM fix took about nine months to ship after merging. The package names one maintainer, and publisher access and long-term funding remain unclear. Color.js and colord recorded more commits over the same period.

Used widely5.5

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

About 17.1M downloads in 4 weeks and about 19.7k dependent repositories show wide real use. Its download ratio of about 3.0 is below the 4.1 median, so it is losing share, while Culori (about 11.7) and d3-color grow faster. Its dependent count is far below color, colord and TinyColor, but its stars (10.6k) are the highest in the category.

  • npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 17.1M vs 5.6M, a ratio of about 3.0, below the 4.1 median
  • dependents repos: 19,731 repos and 1,465 packages
  • github stars: 10,607 stars, the most among peers
  • peers Culori downloads: Culori grew from 2.2M to 25.4M

GPT-6.2 Sol: 4.9, likely 3.7 to 6.1

ecosyste.ms found 19,731 dependent repositories and 1,465 npm packages, consistent with adoption in the tens of thousands. Four-week downloads reached 17.1 million, up 3.04× year over year, which trails the 4.1× catalog median. It has the most stars among the listed peers, while several peers have much larger observed dependent counts. Incomplete repository coverage, CDN use, and automated installs make the number of direct choices uncertain.

Vouched for6.0

Who stands behind it being good?

Claude Opus 5.5: 5.5, likely 4.0 to 7.0

It is long trusted in the data-visualization world and was built by the creator of Datawrapper. Independent comparisons consistently name it the pick for scales and palettes. There is no current survey data. Recent write-ups favour Culori or Color.js for modern color work, and it has almost no current social attention.

GPT-6.2 Sol: 6.5, likely 5.3 to 7.6

GeoStyler and Motion Canvas list chroma.js as a runtime dependency, and Plotly used it in its color-scale picker. These integrations support the case for visualization use and cover earlier versions. Independent performance evidence is mixed, and current satisfaction and retention data are sparse.

Safe7.3

How safe is it to depend on?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

It has zero dependencies, no advisories ever, and permissive licences (BSD-3-Clause and Apache-2.0). The Scorecard is only 4.9: no security policy, unpinned dependencies, broad token permissions and no SAST. Publishing rests on few people.

  • npm dependencies: 0 runtime dependencies
  • advisories total: No known advisories
  • scorecard score: 4.9; Security-Policy, Token-Permissions and Pinned-Dependencies score 0
  • npm license: BSD-3-Clause AND Apache-2.0, both permissive

GPT-6.2 Sol: 7.1, likely 5.9 to 8.3

Zero runtime dependencies, no recorded OSV advisories, and permissive BSD-3-Clause and Apache-2.0 terms keep the known risk low. The package's publish hook runs tests and builds the distribution. OpenSSF scores it 4.9 and flags weak workflow token permissions, unpinned dependencies, and a missing security policy. npm publisher access and release provenance remain unverified.

  • npm dependencies and license; advisories total: Zero runtime dependencies and recorded OSV advisories, with a permissive licence.
  • scorecard score and checks: Token-Permissions, Pinned-Dependencies, and Security-Policy score zero.
  • github.com/gka/chroma.js/blob/v3.3.0/package.json: The publish hook runs tests and builds, and one maintainer is named.
  • github.com/gka/chroma.js/security: GitHub shows no security policy or published advisories.

Good

  • Excellent scale and palette API: chroma.scale with domains, classes, Lab, LCH or OKLCH interpolation, and built-in ColorBrewer palettes.
  • Zero runtime dependencies and no known security advisories.
  • Since v3 it parses and outputs modern CSS lab(), lch(), oklab() and oklch() colors.
  • More than a decade of use, with a large body of examples that AI coding agents already know.

Bad

  • It ships no TypeScript types of its own. Types come from the community-maintained @types/chroma-js package on DefinitelyTyped.
  • It is a single chainable object that tree-shakes poorly, so bundles come out larger than with Culori.
  • It has no Display P3, gamut mapping or broad CSS Color 4 coverage like Color.js and Culori offer.
  • Releases are infrequent and depend on a small group of maintainers. 23 pull requests are waiting.

The numbers

npm downloads, 4 weeks
17M ×3.0 in a year
GitHub stars
11k
Commits, 12 months
35
npm version
3.3.0 Nov 2026
Versions, 12 months
3
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
4.9 out of 10, Nov 2026
Licence
(BSD-3-Clause AND Apache-2.0)

Read on 21 November 2026 from GitHub (gka/chroma.js), npm (chroma-js), OSV and the OpenSSF Scorecard.

Color libraries

  1. 7.9Color.js
  2. 7.0colord
  3. 6.8Culori
  4. 6.6chroma.js
  5. 5.7d3-color
  6. 4.9color
  7. 3.9TinyColor
Compare all 7 on six scores