Color Formats
Full support for Hex, HSL, RGB, OkLab, and OkLCH with seamless conversions between all formats.
Color Formats
Full support for Hex, HSL, RGB, OkLab, and OkLCH with seamless conversions between all formats.
Accessibility
WCAG 2.x contrast ratios and APCA (WCAG 3.0 draft) support for readable color generation.
Design Systems
Generate perceptual color scales with customizable variants for building design tokens.
Modern Displays
P3 gamut optimization and OkLCH operations for wide-gamut color workflows.
import { scale, readableColor, contrast } from 'colorizr';
// Generate a full color scaleconst swatches = scale('#ff0044');// {// 50: '#fff0f0', 100: '#ffe4e3', 200: '#ffcdcc', 300: '#ffaeae',// 400: '#ff8488', 500: '#ff3d5a', 600: '#f7003e', 700: '#cd0029',// 800: '#9a001c', 900: '#66000f', 950: '#350004',// }
// Find readable text color for a backgroundreadableColor('#1a1a2e'); // '#ffffff'
// Check contrast ratiocontrast('#1a1a2e', '#ffffff'); // 17.05Try your colors in these companion apps: