OKLCH to Hex Converter

Convert OKLCH colors to hex codes, with RGB, HSL and CMYK values alongside.

Enter a valid OKLCH value, like oklch(72.3% 0.219 149.579)

  • Hex
  • RGB
  • HSL
  • CMYK

How OKLCH to hex conversion works

It's the same steps as hex to OKLCH, in reverse:

1. a = C × cos(H), b = C × sin(H)
2. Multiply OKLab back into linear RGB
3. Clip anything outside 0–1, add the sRGB gamma curve
4. Multiply by 255 and write in base 16

For oklch(72.3% 0.219 149.579), Tailwind v4's green-500, that gives #00C950. The same color written as hex is what Tailwind's own docs list.

Common colors in hex

ColorOKLCHHex
Whiteoklch(100% 0 0)#FFFFFF
Blackoklch(0% 0 0)#000000
Redoklch(62.8% 0.258 29.2)#FF0000
Orangeoklch(79.3% 0.171 70.7)#FFA500
Yellowoklch(96.8% 0.211 109.8)#FFFF00
Greenoklch(52% 0.177 142.5)#008000
Blueoklch(45.2% 0.313 264.1)#0000FF
Purpleoklch(42.1% 0.193 328.4)#800080
Pinkoklch(86.8% 0.074 7.1)#FFC0CB
Grayoklch(60% 0 0)#808080

Questions

How do I convert OKLCH to hex?

Paste the OKLCH value above, like oklch(72.3% 0.219 149.579) or 0.723 0.219 149.6. Lightness works as a percentage or a decimal. The hex code updates as you type.

Why doesn't converting back give my exact OKLCH?

OKLCH can describe colors that screens using sRGB can't show. When that happens the color is clipped to the nearest one hex can hold, so the OKLCH shown under the result is slightly different. Tailwind v4's green-500 is one of these.

How do I get hex values for Tailwind v4 colors?

Copy the oklch() value from Tailwind's docs or your theme and paste it here. For example, Tailwind v4's blue-500, oklch(62.3% 0.214 259.815), is #2B7FFF.

When do I still need hex?

Figma variables, email templates, brand guides, older codebases and many third-party tools still expect hex or RGB.

More free tools

Landings
Landing Page Examples
Copyright © 2026. All rights reserved.