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: The repo shows recent activity (last upstream push on 2026-05-31) and multiple tagged updates in May 2026 (v6.0.2, v6.0.1, v6.0.0), indicating ongoing development.
- Update cadence: Within a short window, there were three updates clustered around May 2 to May 20 2026, plus additional upstream push later on May 31. This suggests a fast-changing period rather than a long maintenance lull.
AI summary generated Today
Recent updates
v6.0.2
2 weeks agov6.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
1 month agov6.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
1 month agov6.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
1 month agoRelease 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
1 month agov5.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
2 months agov5.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
2 months agov5.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
2 months agov5.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
2 months agoRelease 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
2 months agoRelease 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