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)
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 16For 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.
| Color | OKLCH | Hex |
|---|---|---|
| White | oklch(100% 0 0) | #FFFFFF |
| Black | oklch(0% 0 0) | #000000 |
| Red | oklch(62.8% 0.258 29.2) | #FF0000 |
| Orange | oklch(79.3% 0.171 70.7) | #FFA500 |
| Yellow | oklch(96.8% 0.211 109.8) | #FFFF00 |
| Green | oklch(52% 0.177 142.5) | #008000 |
| Blue | oklch(45.2% 0.313 264.1) | #0000FF |
| Purple | oklch(42.1% 0.193 328.4) | #800080 |
| Pink | oklch(86.8% 0.074 7.1) | #FFC0CB |
| Gray | oklch(60% 0 0) | #808080 |
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.
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.
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.
Figma variables, email templates, brand guides, older codebases and many third-party tools still expect hex or RGB.