OKLCH.xyz
← Learn

OKLCH Gamut Mapping

Why you should reduce chroma in OKLCH instead of clipping RGB channels when a color falls outside a display's gamut.

Updated Jul 1, 2026 · By OKLCH.xyz editorial team

OKLCH can describe colors more vivid than any given display can show. When that happens, you have to map the color into the gamut. How you do it matters.

Naive clipping is wrong

The old approach clamps each RGB channel to [0, 1]. This shifts both hue and lightness — a vivid orange can turn muddy or drift toward red.

CSS Color 4 gamut mapping

The modern method keeps lightness and hue fixed and reduces chroma in OKLCH until the color just fits the target gamut, using a binary search with a small ΔE tolerance. The result is the closest in-gamut color that still looks like what you asked for.

Out-of-gamut oklch(0.7 0.30 145)
      ↓ reduce chroma, keep L and H
In-gamut   oklch(0.7 0.19 145)

Every tool on this site uses this method. Convert with the OKLCH to HEX converter and watch chroma, not lightness, absorb the change.

Calculation methodology

The tools use the CSS Color 4 OKLCH chroma-reduction algorithm and show naive channel clipping only as a comparison.

References

Related tools:Palette Generator