OKLCH Color Converter

OKLCH represents perceptual lightness, chroma, and hue. It is useful for systematic palettes because similar numerical lightness changes are more visually even than common HSL changes.

Worked example

Input
#663399
Output
oklch(0.44 0.16 303.373)
Calculation
sRGB → linear RGB → OKLab → OKLCH

How the conversion works

Decode sRGB channels to linear light, transform linear RGB to OKLab, then convert the a and b axes to polar chroma and hue. The worked result is rounded for display.

Important note

Some OKLCH coordinates fall outside the sRGB gamut. This tool clips out-of-gamut conversions to valid sRGB channel bounds, so a reverse conversion can lose chroma.

Open this example in the color tool