A modern JavaScript library that resolves, parses, and converts CSS color strings, including modern Color Module Level 4 and 5 features like color-mix(), color(), advanced color spaces, var(), and calc(). It is useful for turning CSS color and gradient values into computed or specified results, and for converting between formats like HEX, RGB, HSL, LAB, LCH, and OKLCH. It also exposes utilities for validating colors and gradients.
Project status
- Actively maintained: Yes. The upstream and repo show regular updates in 2026 (most recent on 2026-06-28, with follow-on updates as recent as 2026-06-20), and multiple versions include code changes rather than only dormant housekeeping.
- Update cadence: About weekly to every few weeks recently (v6.0.3 on 2026-06-20, v6.0.4 on 2026-06-28), with a steady stream through May to June 2026.
AI summary generated
Recent updates
v6.0.5
v6.0.5 replaces the internal cache implementation based on GenerationalCache with an LRUCache, and increases the configured cache size. The release notes only call out this cache swap, but the code diff also shows an exported cache symbol rename and other build and tooling changes.
Breakingv6.0.4
Release v6.0.4 contains a small internal change to the caching configuration, plus a set of dependency/tooling bumps. The provided release notes do not enumerate any specific functional changes or breaking changes.
v6.0.3
v6.0.3 makes substantial internal changes to caching behavior and upgrades several dependencies. The release notes contain only a changelog link and do not document any of the behavioral or API-relevant changes present in the code diff.
v6.0.2
v6.0.2 focuses on refactoring the internal null handling and reorganizing CSS calc and var resolution logic. It removes the NullObject sentinel type, consolidates css-calc and css-var into a single module, and moves the isColor helper. A new resolver pathway is also introduced to support resolving relative colors more flexibly.
BreakingFeaturesv6.0.1
v6.0.1 does not include any source code changes in the provided diff, but it bumps the dependency @asamuzakjp/generational-cache from 1.0.1 to 2.0.1 and updates the lockfile accordingly. The release notes are effectively empty (only a comparison link), so the dependency change is likely the main content of this release.
v6.0.0
v6.0.0 removes support for Node.js v20.x and updates the package/tooling versions used for build and tests. The code also removes some exported utility functions from the public API and changes how the library converts the CSS length unit 'vb' inside resolveLengthInPixels.
Breakingv5.1.11
Release v5.1.11 switches the project to use the external @asamuzakjp/generational-cache implementation instead of the previously in-repo GenerationalCache class. It also increases the configured cache size used by the shared cache instance.
v5.1.10
v5.1.10 is described as a refactor of the caching layer and general code cleanup. While the release notes are brief, the code diff shows broader internal rewrites across color parsing, cache key generation, calc serialization, gradients validation, CSS variable resolution, and relative color handling.
v5.1.9
v5.1.9 updates the internal GenerationalCache implementation and adjusts how cache sizing works. Release notes only mention “Update GenerationalCache and expose”, but the actual diff shows multiple behavioral changes in caching logic and default sizing.
v5.1.8
v5.1.8 makes changes to the caching layer, including updates to cache handling and cache key generation. It also bumps a few dev tool dependencies (vite/vitest coverage) and updates the test expectations for the cache key format.
v5.1.6
v5.1.6 replaces the previous `lru-cache` usage with a custom generational cache implementation. The public change in the release notes is limited to removing `lru-cache`, but the code diff shows additional API surface and behavior changes in the cache module.
v5.1.5
Release v5.1.5 is described as a refactor focused on cache key generation, token iteration patterns, and some utility logic. The release notes do not mention any public API removals or behavioral changes, but the code diff shows multiple functional logic changes beyond simple refactoring.
v5.1.4
Release v5.1.4 includes a change to the isAbsoluteFontSize() utility. The release notes only mention this update, but the code diff also shows dependency/tooling bumps and a behavior change in how absolute font sizes are parsed.
Security