A comprehensive utility library for parsing, converting, and analyzing color values across all major color models — hex, RGB, HSL, HSV, HWB, Lab, LCH, Oklab, Oklch, CMYK, Display P3. Zero dependencies.

Parse any color format with ease: hex, RGB, HSL, HSV, HWB, Lab, LCH, Oklab, Oklch, CMYK, Display P3, and even CSS variables. All conversions between models are performed with high precision and are lossless when reversing. This forms the foundation for all subsequent color operations.
Lighten, darken, saturate, desaturate, invert, or rotate the hue of any color. Mix colors and create smooth transitions in six color spaces (RGB, HSL, Lab, LCH, Oklab, Oklch) with four hue interpolation modes. Generate multi-stop scales based on anchor points.
Instantly generate proven color schemes: complementary, triadic, analogous, tetradic, and more. Build tints, shades, and tones palettes using Oklab for maximum visual uniformity. For large datasets, use generator functions that yield colors lazily, saving memory.
Check contrast per WCAG, determine compliance level (AAA/AA), and pick the ideal text color for any background, including semi‑transparent and gradient ones. Analyze how your colors are perceived by people with three types of color blindness (protanopia, deuteranopia, tritanopia) using Vienot matrices.
Use the built‑in CLI for quick color analysis from the terminal. Speed up repeated operations in rendering loops with the built‑in LRU cache for the normalization function. All functionality is available with zero external dependencies, shipped in ESM and CommonJS formats with full TypeScript support.