# chroma.js: 6.6 out of 10

Reasonable, with limits. 4th of 7 in [Color libraries](https://elestia.ai/opensource/colors/index.md).

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.

## Scores

- **Overall: 6.6** (likely 5.6 to 7.6)
  - Claude Opus 5.5 (6.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): 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 many: 4.8** (likely 3.8 to 5.9)
  - Claude Opus 5.5 (5.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): 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 lot: 7.1** (likely 6.1 to 8.1)
  - Claude Opus 5.5 (6.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): 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 time: 6.3** (likely 4.9 to 7.4)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (6.5): 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 widely: 5.5** (likely 4.4 to 6.6)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (4.9): 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 for: 6.0** (likely 4.7 to 7.3)
  - Claude Opus 5.5 (5.5): 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): 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.
- **Safe: 7.3** (likely 6.2 to 8.4)
  - Claude Opus 5.5 (7.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.
  - GPT-6.2 Sol (7.1): 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.

## 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

- Downloads, 4 weeks: 17M
- In a year: ×3.0
- GitHub stars: 11k
- Commits, 12 months: 35
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: (BSD-3-Clause AND Apache-2.0)
- GitHub: https://github.com/gka/chroma.js
- npm: https://www.npmjs.com/package/chroma-js

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
