# TinyColor: 3.9 out of 10

Keep, but not for new work. 7th of 7 in [Color libraries](https://elestia.ai/opensource/colors/index.md).

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

- **Overall: 3.9** (likely 3.0 to 5.0)
  - Claude Opus 5.5 (3.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.
  - GPT-6.2 Sol (4.3): 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.
- **Needed by many: 4.7** (likely 3.6 to 5.8)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (4.3): 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.
- **Helps a lot: 5.1** (likely 4.1 to 6.2)
  - Claude Opus 5.5 (4.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.
  - GPT-6.2 Sol (5.7): 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.
- **Holds up over time: 2.6** (likely 1.6 to 4.0)
  - Claude Opus 5.5 (2.0): 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.
  - GPT-6.2 Sol (3.1): 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.
- **Used widely: 6.2** (likely 5.1 to 7.3)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (6.3): 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.
- **Vouched for: 4.7** (likely 3.6 to 6.0)
  - Claude Opus 5.5 (3.5): 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.
  - GPT-6.2 Sol (5.8): 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.
- **Safe: 6.0** (likely 4.6 to 7.4)
  - Claude Opus 5.5 (6.0): 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.
  - GPT-6.2 Sol (6.0): 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.

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

- Downloads, 4 weeks: 75M
- In a year: ×2.7
- GitHub stars: 5.3k
- Commits, 12 months: 0
- Last npm release: Feb 2023
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/bgrins/TinyColor
- npm: https://www.npmjs.com/package/tinycolor2

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.
