OKLCH.xyz

OKLCH to HEX Converter

Turn any oklch() value into a gamut-safe sRGB hex color.

HEX
#000000
OKLCHoklch(0 0 0)
OKLABoklab(0% 0 0)
RGBrgb(0% 0% 0%)
HSLhsl(none 0% 0%)
LABlab(0 0 0)
LCHlch(0 0 none)
Display P3color(display-p3 0 0 0)
sRGBIn gamutP3In gamutRec.2020In gamut

Gamut mapping, not clipping

OKLCH can describe colors brighter than any hex can represent. Rather than truncating RGB channels, we reduce chroma in OKLCH until the color fits sRGB, preserving hue and lightness — the method defined by CSS Color 4.

Frequently asked questions

How do I convert OKLCH to HEX?

Paste an oklch() value such as oklch(0.62 0.21 259). It is gamut-mapped into sRGB and shown as a #rrggbb hex value.

What if my OKLCH color is outside sRGB?

It is gamut-mapped with the CSS Color 4 algorithm (chroma reduction), not channel clipping, so the hex is the closest in-gamut match.

Related tools