CHROMA

OKLCH to HEX Converter

Type a OKLCH value and get HEX straight away. Everything runs in your browser — nothing is sent to a server.

Result

Other formats

HOW

How the conversion works

L, C and H are converted back to Oklab’s rectangular form, then to RGB, then written as hexadecimal. OKLCH is wider than sRGB, so some values cannot be displayed — those are adjusted to the nearest available color and flagged.

OKLCH

OKLCH has the same three ideas as HSL — lightness, chroma, hue — but built on a model of how eyes actually work. Two colors with the same L look equally bright, which is what makes it good for generating tint scales and for checking contrast. It also reaches colors sRGB cannot show, so a valid OKLCH value may have no exact HEX; the converter clamps those back into range.

HEX

HEX is the same red-green-blue triplet as RGB, just written in base 16 so each channel fits in two characters. It survives everywhere — CSS, design tools, config files — because it is short and unambiguous. Case does not matter, and #abc is shorthand for #aabbcc. An eight-digit HEX adds alpha as a final pair, which is why #FF000080 is half-transparent red.

STEPS

OKLCH to HEX, step by step

Worked through with #FF6347. Every number comes from the same engine the converter above uses.

  1. Polar form back to rectangular a = C·cos(H) = 0.165 b = C·sin(H) = 0.105
  2. The return path Oklab → linear RGB → sRGB
  3. Re-apply the gamma (sRGB) rgb(255, 99, 71)
  4. Write each channel in base 16 R 255 = 15×16 + 15 → FF G 99 = 6×16 + 3 → 63 B 71 = 4×16 + 7 → 47
  5. Join them up # + FF + 63 + 47 = #FF6347
EXAMPLES

OKLCH to HEX examples

ColorOKLCHHEX
Red oklch(62.8% 0.2577 29.23) #FF0000
Tomato oklch(69.6% 0.1955 32.32) #FF6347
Orange oklch(79.3% 0.171 70.67) #FFA500
Gold oklch(88.7% 0.1822 95.33) #FFD700
Limegreen oklch(74.2% 0.2286 142.83) #32CD32
Teal oklch(54.3% 0.0927 194.77) #008080
Dodgerblue oklch(65.2% 0.1901 253.21) #1E90FF
Royalblue oklch(56% 0.1882 266.4) #4169E1
Blueviolet oklch(53.4% 0.2503 301.37) #8A2BE2
Hotpink oklch(72.8% 0.1971 351.99) #FF69B4
FAQ

Common questions

My OKLCH is valid but the HEX looks duller. Why?

You asked for a color outside sRGB. There is no HEX for it, so the converter moves it to the closest one that exists — usually by reducing chroma while holding lightness and hue.

Should I write L as 0.6 or 60%?

Both are accepted and mean the same thing. Percent tends to be easier to scan in a stylesheet, especially next to saturation values written the same way.

How do I keep a palette inside sRGB?

Hold chroma below about 0.25 and you will rarely leave the gamut at any hue. Above that the safe ceiling depends heavily on hue — yellows and greens run out much sooner than blues.

MORE

Other converters