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.
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.
- npm downloads ratio vs medianDownloadsRatio: About 3.0 vs a 4.1 median, losing ground
- pkgpulse.com/blog/culori-vs-chroma-js-vs-tinycolor2-color-manipulation-javascript-2026: Recommends Culori for design systems and OKLCH, chroma for data viz
- github.com/gka/chroma.js/releases: v3 modernized CSS color support
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.
- gka.github.io/chroma.js: Documents scale features that suit charts and maps.
- colorjs.io/docs/spaces.html: Color.js supports Display P3 and other wide-gamut spaces.
- culorijs.org: Culori supports the formats defined in CSS Color Level 4.
- github.com/gka/chroma.js/releases/tag/v3.3.0: Current stable release fixes correctness and packaging issues.
- github.com/gka/chroma.js/issues/406: User report documents the wait for the light-build import fix.
- npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo; medianDownloadsRatio: Install growth trails the catalog median.
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.
- pkgpulse.com/blog/culori-vs-chroma-js-vs-tinycolor2-color-manipulation-javascript-2026: Recommends chroma-js mainly for heatmaps, maps and charts
- Category scope: Color manipulation is a common but secondary need in web apps
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.
- 2025.stateofcss.com/en-US/features: Respondents report theming and contrast pain points.
- developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/color-mix: CSS supports native color mixing.
- gka.github.io/chroma.js: Documents programmatic palettes, conversions, and scales.
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.
- github.com/gka/chroma.js/releases: v3 added oklch/lab CSS support; v3.3.0 fixed interpolation and parsing
- raw.githubusercontent.com/colorjs/color-space/HEAD/docs/library-comparison.md: Lists chroma-js as strong on scales but not tree-shakeable and without LUV/LCHuv
- pkgpulse.com/blog/culori-vs-chroma-js-vs-tinycolor2-color-manipulation-javascript-2026: About 60KB, largest of the three; no Display P3
- npm hasTypes: No bundled TypeScript types
- npmjs.com/package/@types/chroma-js: Types come from DefinitelyTyped
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.
- gka.github.io/chroma.js: Interactive examples cover mixing, scale classes, and lightness correction.
- github.com/gka/chroma.js/releases/tag/v3.3.0: Fixes interpolation endpoints, alpha handling, and scale behavior.
- npmjs.com/package/%40types/chroma-js?activeTab=versions: DefinitelyTyped publishes declarations separately.
- github.com/gka/chroma.js/issues/384: Open user report shows CSS color(srgb …) is rejected.
- colorjs.io/docs/gamut-mapping.html: Color.js documents explicit gamut mapping.
- saturon.js.org/docs/benchmarks: Reproducible third-party parsing and conversion benchmark of version 3.2.0.
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.
- github commitsLastYear, releasesLastYear and peers commitsLastYear: Active this year, with fewer commits than Color.js and colord.
- github.com/gka/chroma.js/releases/tag/v3.3.0: A recent release includes fixes from multiple contributors.
- github.com/gka/chroma.js/issues/406: The reporter confirmed the light-build fix after a long release gap.
- github.com/gka/chroma.js/blob/v3.3.0/package.json: The package manifest names one maintainer.
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.
- dependents repos and packages; peers dependentRepos: Observed dependent counts trail color, colord, TinyColor, and d3-color.
- npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo; medianDownloadsRatio: Download growth of 3.04× falls below the 4.1× baseline.
- github stars; peers stars: 10,607 stars lead the peer group.
- github.com/GeoTIFF/georaster-layer-for-leaflet-example/blob/master/examples/color-scale.html: A mapping example loads chroma.js from a CDN.
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.
- pkgpulse.com/blog/culori-vs-chroma-js-vs-tinycolor2-color-manipulation-javascript-2026: Independent guide endorses it for data visualization
- raw.githubusercontent.com/colorjs/color-space/HEAD/docs/library-comparison.md: Third-party comparison rates its palette and scale support well
- bluesky posts / hackerNews stories: 1 Bluesky post and 0 Hacker News stories
- Datawrapper: The author's data-viz company uses it
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.
- github.com/geostyler/geostyler/blob/main/package.json: GeoStyler declares chroma.js 3.2.0.
- github.com/motion-canvas/motion-canvas/blob/main/packages/core/package.json: Motion Canvas core depends on chroma.js 2.4.2.
- github.com/plotly/react-colorscales/blob/master/package.json: Plotly's older color-scale picker depends on chroma.js.
- saturon.js.org/docs/benchmarks: The benchmark shows competitive conversion and weaker parsing results.
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.