opyeb ColorOKLCH

15 guides · Foundations

OKLCH — the most calculable way to choose colour in 2026

Basis 28 November 2026 · Foundations · about 8 min

OKLCH describes a colour with three values: lightness (L), chroma (C) and hue (H). It is Björn Ottosson's OKLab from 2020 turned into cylindrical coordinates, and since 2023 Chrome, Safari and Firefox have all accepted it in CSS as the oklch() function. On the surface it looks like HSL, but there is one decisive difference: HSL lightness is an average of the R, G and B channels, while OKLCH lightness is corrected to match perceived brightness. That single difference changes how an entire palette behaves.

What the three axes mean

ValueRangeMeaningIn practice
L0 – 100%Perceived lightness; 0 black, 100 whitea 10-point step looks like a 10-point step
C0 – 0.4Chroma; 0 is neutral greyUI work sits between 0.02 and 0.18
H0 – 360°Hue angle; 0 pink, 120 green, 240 bluefix it and the palette reads as one family

The important property is that the axes are close to independent. In HSL, raising saturation shifts lightness and raising lightness drifts the hue toward yellow. In OKLCH, changing C leaves L almost untouched, and changing L leaves H in place. So the lighter or darker version of a colour can be produced without touching the other axes.

Why HSL is not enough

HSL at L 50% only means the channel average is 50%. Yellow hsl(60 100% 50%) and blue hsl(240 100% 50%) share that L and look nothing alike in brightness. Build a 50 to 950 ramp on HSL and the step size changes with every hue, which makes button fills and body text unpredictable. Raise OKLCH L by ten points and every hue brightens by roughly the same amount: the ramp looks even and contrast moves monotonically.

HSL remains common because the tools are familiar. In 2026, though, oklch() works in every current browser and design tools accept OKLCH input. A new palette is better started in OKLCH than converted into it later, because the corrections you make along the way stay valid.

Where OKLCH fits

The limits are real too

OKLCH is perceptually even but not perfect. Chroma collapses quickly at very low lightness, and how much chroma sRGB can hold depends heavily on hue. Blue leaves sRGB around C 0.16 while yellow holds 0.2 and more. Using one C across all hues therefore clips some colours and washes out others. The calculator checks the gamut for every step, badges how much was clipped, and writes a separate hex fallback.

The other limit is naming. An OKLCH value does not say “blue” or “navy”. Where a name is needed, keep the name in the token and the value in OKLCH. Separating name from value means the name survives when the colour changes.

Basis date 28 November 2026. OKLCH is defined in W3C CSS Color Module Level 4.

Questions

How is OKLCH different from OKLab?

They are the same space in different coordinates. OKLab uses rectangular L, a and b; OKLCH converts it to L, C and H. Use OKLCH when you want to adjust hue and chroma directly, and OKLab when you want to compare two colours numerically.

What happens in a browser that does not know OKLCH?

The declaration is dropped and the previous colour stays. That is why the safe pattern is a hex value first, then @supports (color: oklch(0 0 0)) to override it. The export code follows that order.

Is L 100% always white?

At zero chroma it is, but with chroma it leaves the gamut and the browser maps it. In practice L 97 to 99% with low chroma is safer than pushing to 100%.

Move L, C and H yourself and watch the eleven steps change.

Open the tool

Basis date 28 November 2026. Written against the W3C specifications, the APCA documentation and published browser support tables; updated when they change.

Back to the guides