OKLCH: Oklab Lightness Chroma Hue Cylindrical
Bjorn Ottosson's perceptual polar space standardized in W3C CSS Color 4 and Tailwind v4 — equal Lightness guarantees steady visual contrast across all hues.
| Extension / Token | .css / .json |
|---|---|
| MIME / Media type | text/css |
| Gamut scope | Wide Gamut (P3 / Unbounded) |
| Human readability | High |
| Perceptual uniformity | Yes |
| Alpha channel support | Yes |
| Best for | Perceptually uniform UI palettes, Tailwind v4 design tokens, and wide-gamut CSS |
OKLCH
CSS / .JSONoklch(54.6% 0.215 262.9)Strengths
- Predictable perceptual Lightness makes automated 50–950 accessible UI scales consistent across every hue.
- Zero blue-to-purple hue drift seen in CIELab or uneven contrast seen in HSL.
- Unlocks vibrant wide-gamut Display P3 and Rec.2020 colors cleanly inside one CSS function.
Trade-offs
- High Chroma values at extreme Lightness can fall outside sRGB and require gamut clamping.
- Slightly longer CSS string compared to 7-character Hex codes.
Convert & inspect OKLCH locally
Related color engineering guides
- Hex to OKLCH: Migrating Design Tokens to Tailwind CSS v4Step-by-step guide to upgrading Hex and HSL Tailwind v3 themes into CSS Color 4 @theme oklch() scales with perceptual brightness and Display P3 support.
- OKLCH vs HSL vs sRGB: Understanding Wide-Gamut Display P3Compare HSL, sRGB Hex, Display P3, and OKLCH across perceptual lightness, gradient dead zones, gamut volume, and CSS progressive enhancement.
- WCAG 2.2 Contrast Ratio vs APCA (Lc): Complete Color GuideCompare WCAG 2.2 relative luminance ratios (4.5:1) against modern APCA perceptual lightness contrast (Lc 60/75/90), dark-mode polarity, and CVD.
OKLCH frequently asked questions
Why does Tailwind CSS v4 default to OKLCH?
Tailwind v4 ships its entire default color palette in oklch() because consistent L values produce reliable contrast ratios across hues and richer P3 displays.
How do browsers handle out-of-sRGB OKLCH colors on older monitors?
CSS Color 4 specifies chroma-reduction gamut mapping so out-of-sRGB oklch() colors gracefully map onto the display gamut while preserving hue and lightness.