TinyColor
Keep, but not for new work. 7th of 7 color libraries.
TinyColor (tinycolor2) is a small, zero-dependency library for parsing and changing sRGB colors. It is still installed very widely, but it has had no release since February 2023 and no commits in the last year. It supports no modern color spaces such as OKLCH, LCH or P3, and ships no built-in types. Keep it where it already runs; for new work, pick colord, Culori or Color.js.
Best for: Existing codebases that already use tinycolor2 for simple sRGB parsing, lighten/darken, or readability checks, and have no reason to migrate yet.
Scores
Overall3.9
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 3.5, likely 2.5 to 4.5
It still works for simple sRGB tasks and is safe in itself, but it is effectively unmaintained and lacks modern color spaces and built-in types. colord does the same simple job smaller, typed and actively maintained, and Culori and Color.js cover modern CSS color. Keep it where it runs, and choose a peer for new work.
- github commitsLastYear: No activity in the last year.
- peers colord: colord has 59 commits in the last year, a release in Nov 2026 and 103M downloads.
- pkgpulse.com/blog/culori-vs-chroma-js-vs-tinycolor2-color-manipulation-javascript-2026: Calls it legacy and points new projects to Culori or chroma-js.
GPT-6.2 Sol: 4.3, likely 3.4 to 5.5
Keep TinyColor where its permissive parsing and conversions already meet the project’s needs. For new projects, Culori handles modern CSS input and colord offers a typed API for common operations. TinyColor’s large installed base supports continued use in existing projects, but years without an npm release and growth below the catalog baseline weaken its case for new work.
- github.com/plotly/plotly.js/releases/tag/v4.0.0: A downstream migration shows the practical benefit of broader CSS support.
- npmjs.com/package/colord: Colord documents a typed API for parsing and manipulation.
- npm latestPublishedAt and downloadsLast4Weeks; github commitsLastYear; medianDownloadsRatio: A large install base, no recent maintenance, and below-baseline download growth.
Needed by many4.7
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Many front-end and UI developers parse or adjust colors at some point, but it is not needed in most projects. TinyColor covers the common everyday sRGB part of the job and works on any runtime.
- category job: Color manipulation appears in UI, theming and charting work, not in most backend work.
GPT-6.2 Sol: 4.3, likely 3.2 to 5.5
Color pickers, design systems, and charts often need to compute colors in JavaScript. TinyColor works across browsers and Node.js, but its focus on older formats limits its fit for modern design systems. The State of CSS survey identifies theming and contrast as pain points, leaving demand for a JavaScript color library uncertain.
- 2025.stateofcss.com/en-US/features: Respondents cite theming, contrast, and wide-gamut color problems.
- github.com/bgrins/TinyColor: Documents browser and Node.js usage and supported formats.
- github.com/plotly/plotly.js/issues/7523: A charting project reports a modern CSS parsing gap.
Helps a lot5.1
How well does it do the job for those who need it?
Claude Opus 5.5: 4.5, likely 3.5 to 5.5
The API is pleasant and does basic sRGB work well, including readability checks. It lacks modern color spaces, interpolation, built-in types and clean ESM packaging, which colord, Culori and Color.js all offer. Open issues report a polyad() function that was never re-enabled, unbounded loops, and changes made in place.
- pkgpulse.com/blog/culori-vs-chroma-js-vs-tinycolor2-color-manipulation-javascript-2026: Supports sRGB only, has no OKLCH/LCH/Lab, ships CJS only, and has types only via @types.
- github.com/bgrins/TinyColor/issues: 2026 bug reports on setAlpha, polyad() and unbounded loops, plus a 2024 report on changes made in place.
- npm hasTypes: No bundled TypeScript types.
- github.com/omgovich/colord: A peer claims to be several times smaller and faster than tinycolor2.
GPT-6.2 Sol: 5.7, likely 4.7 to 6.8
Version 1.6.0 makes common conversions, RGB mixing, and contrast checks easy to write. Callers need an explicit validity check to catch the fallback to black, and TypeScript needs separate declarations. Plotly documented lost transparency with modern CSS input, while colord ran about three times as fast in one hex benchmark. The benchmark covers one operation, and its importance depends on the workload.
- github.com/bgrins/TinyColor: Documents the API, worked examples, and fallback to black.
- github.com/plotly/plotly.js/issues/7523: Plotly reports valid CSS input losing transparency.
- raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/tinycolor2/index.d.ts: Community declarations cover the main API.
- romgrk.com/posts/color-bits: A competing library author benchmarks hex parsing, alpha changes, and formatting.
Holds up over time2.6
Will it still be a good choice in two years?
Claude Opus 5.5: 2.0, likely 1.0 to 3.5
There were no commits or releases in the last year, and the last npm publish was 1.6.0 in Feb 2023. A 1.6.1 release task has been open since 2023. Issues filed in 2026 go unanswered, and Scorecard rates maintenance at 0. It is not archived or deprecated, but the ecosystem is moving to colord, Culori and Color.js.
- github commitsLastYear: 0 commits and 0 releases in the last year.
- npm latestPublishedAt: Last published 2023-02-03.
- scorecard Maintained: Score 0.
- npm-compare.com/chroma-js,color,polished,tinycolor2: Calls it legacy with slower evolution and advises against it for new apps.
GPT-6.2 Sol: 3.1, likely 2.2 to 4.4
TinyColor had zero commits in the last year, and npm still lists 1.6.0 from February 2023. The proposed 1.6.1 release remains open, while colord and Color.js both shipped updates in 2026. Existing users can keep relying on the stable API, but the timing of future fixes and the number of active publishers are unclear.
- github commitsLastYear and npm latestPublishedAt: Zero commits in the last year and no npm release since February 2023.
- github.com/bgrins/TinyColor/issues/267: The proposed 1.6.1 release has been open since 2023.
- peers commitsLastYear and latestPublishedAt: Colord and Color.js show active development and 2026 releases.
Used widely6.2
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It has about 75M downloads in 4 weeks and 280k dependent repos, which puts it high among its peers. Most of that comes through other packages that depend on it, not direct choices. Its download ratio of 2.7 is well below the 4.1 median, so it is losing ground. Culori, Color.js and d3-color are growing much faster.
- npm downloadsLast4Weeks: 75.4M, up from 28.2M a year ago (ratio 2.67, below the 4.1 median).
- dependents repos: 280,168 repos and 2,720 packages, far more than Culori or Color.js but fewer than color or colord.
- bluesky posts: 0 posts, so there is no current developer attention.
GPT-6.2 Sol: 6.3, likely 5.2 to 7.5
Ecosyste.ms found about 280,000 dependent repositories, more than chroma.js or d3-color in the bundle and fewer than colord or color. Four-week downloads rose from 28.2 million to 75.4 million, about 2.67× year over year, below the 4.1× catalog baseline. Established packages like React Color pull it in transitively, so installs leave the pace of new direct adoption uncertain.
- dependents repos and packages; peers dependentRepos: 280,168 repositories and 2,720 packages, behind colord and color in repository count.
- npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo; medianDownloadsRatio: 2.67× growth trails the 4.1× catalog median.
- github stars and bluesky posts: 5,250 stars and zero tracked recent Bluesky posts.
- github.com/casesandberg/react-color/blob/master/package.json: React Color installs tinycolor2 as a runtime dependency.
Vouched for4.7
Who stands behind it being good?
Claude Opus 5.5: 3.5, likely 2.5 to 5.0
Its long history of use in many UI libraries shows it is stable, but those endorsements are old. Current independent comparisons call it legacy and recommend chroma-js, Culori or colord for new work. No current survey or benchmark favours it.
- pkgpulse.com/blog/culori-vs-chroma-js-vs-tinycolor2-color-manipulation-javascript-2026: Recommends it for legacy codebases only.
- npm-compare.com/chroma-js,color,polished,tinycolor2: Recommends chroma-js over it for new projects.
- github stars: 5.2k stars, mostly from past years.
GPT-6.2 Sol: 5.8, likely 4.6 to 6.9
Excalidraw and Tencent’s TDesign Vue list TinyColor as a runtime dependency. Plotly also relied on it, then switched to Culori in v4 to handle modern CSS color syntax. Those integrations show real use, while the migration and scarce recent evidence of developer satisfaction limit the score.
- github.com/excalidraw/excalidraw/blob/master/packages/common/package.json: Excalidraw’s common package pins tinycolor2 1.6.0.
- github.com/Tencent/tdesign-vue/blob/develop/package.json: TDesign Vue lists TinyColor as a runtime dependency.
- github.com/plotly/plotly.js/releases/tag/v4.0.0: Plotly moved its color processing to Culori.
Safe6.0
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
It has zero dependencies, no advisories and an MIT licence, and the code is stable. The widely reported 2025 Shai-Hulud compromise hit @ctrl/tinycolor, a separate fork, not tinycolor2. The risks are a dormant publishing setup with no code review, branch protection or security policy (Scorecard 4.3), and no one active to respond if a problem appears.
- advisories total: 0 advisories.
- npm dependencies: 0 dependencies.
- scorecard score: 4.3 overall; Code-Review, Branch-Protection and Security-Policy are all 0.
- socket.dev/blog/tinycolor-supply-chain-attack-affects-40-packages: Only @ctrl/tinycolor 4.1.1 and 4.1.2 were compromised; tinycolor2 is not named.
- stepsecurity.io/blog/ctrl-tinycolor-and-40-npm-packages-compromised: Confirms the attack targeted the @ctrl scope.
GPT-6.2 Sol: 6.0, likely 4.7 to 7.2
TinyColor has zero runtime dependencies, a permissive MIT license, and zero OSV advisories in the bundle. The Shai-Hulud advisory concerns the separate npm package @ctrl/tinycolor. An open issue reports that invalid palette counts can exhaust memory. Weak Scorecard results for branch protection and security policy, along with unclear publishing controls, leave uncertainty about how quickly a problem would be fixed.
- npm dependencies and license; advisories total: Zero runtime dependencies, MIT license, and zero collected OSV advisories.
- scorecard score and checks: 4.3 overall, with zero scores for branch protection, code review, and security policy.
- github.com/advisories/GHSA-qjqf-7j6f-82c4: The malware advisory names the scoped fork @ctrl/tinycolor.
- github.com/bgrins/TinyColor/issues/280: Open report of memory exhaustion in palette generation.
Good
- It parses messy input (hex, rgb(), hsl(), color names and objects) forgivingly, with one simple chainable API.
- It has zero runtime dependencies, an MIT licence and no known advisories.
- It has built-in WCAG readability helpers (isReadable, mostReadable) and color-scheme helpers.
- It is used in hundreds of thousands of repos, so it is well known and AI agents write correct code for it.
Bad
- It handles sRGB only, with no OKLCH, LCH, Lab or Display P3 support for modern CSS colors.
- It has had no release since 1.6.0 in Feb 2023 and no commits in the last year, while new bug reports in 2026 get no reply.
- It ships no bundled TypeScript types (they come from @types) and its packaging is mostly CommonJS.
- Its methods change the color in place, which causes side effects in chains, and it has no interpolation or color scales.
The numbers
- npm downloads, 4 weeks
- 75M ×2.7 in a year
- GitHub stars
- 5.3k
- Commits, 12 months
- 0
- npm version
- 1.6.0 Feb 2023
- Versions, 12 months
- 0
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 4.3 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (bgrins/TinyColor), npm (tinycolor2), OSV and the OpenSSF Scorecard.