OKLCh to RGB

If the chroma you asked for is not reachable in sRGB, the result is the closest color that is, keeping hue and lightness intact.

Paste a OKLCh value. Other formats work too.

RGB
rgb(0 171 231)

Need every format at once? Open in the full picker

Worked examples

Common colors converted from OKLCh to RGB, computed with the same engine the picker uses.

ColorOKLChRGBCopy
Pure redoklch(62.796% 0.25768 29.234)rgb(255 0 0)
Pure greenoklch(86.644% 0.29483 142.495)rgb(0 255 0)
Pure blueoklch(45.201% 0.31321 264.052)rgb(0 0 255)
Whiteoklch(100% 0 0)rgb(255 255 255)
Mid grayoklch(59.987% 0 0)rgb(128 128 128)
Blackoklch(0% 0 0)rgb(0 0 0)
Interface blueoklch(63.521% 0.17906 259.418)rgb(66 135 245)
Success greenoklch(72.275% 0.19201 149.579)rgb(34 197 94)
Danger redoklch(63.683% 0.20785 25.331)rgb(239 68 68)
Warning amberoklch(76.859% 0.16466 70.08)rgb(245 158 11)
Editor blackoklch(23.503% 0 0)rgb(30 30 30)
Warm sandoklch(83.419% 0.11701 87.428)rgb(233 196 106)

How the conversion works

If the chroma you asked for is not reachable in sRGB, the result is the closest color that is, keeping hue and lightness intact.

Both formats are computed from a single canonical representation (CIE XYZ with a D65 white point, held in floating point) rather than by chaining one format into the next. That matters because chained conversions accumulate rounding error, and because it means a color that cannot be represented in the target format is handled deliberately rather than by accident.

When the source describes a color outside the target's gamut, chroma is reduced in OKLCh while lightness and hue are held, following the CSS Color 4 gamut mapping algorithm. Clipping each channel independently would be simpler but visibly shifts hue on saturated colors.

Related conversions