OKLCH to HEX Converter
Translate between OKLCH and OKLCH—the modern CSS Color Module 4 standard with uniform human perceptual lightness.
All 7 Color Space Formats for #E07A5F
Click any format card to copy its full CSS value directly to your clipboard.
Developer Code Snippets
Production-ready snippets formatted for web, mobile, and game engines.
Why Convert from OKLCH to HEX?
Legacy color spaces like HSL and sRGB do not reflect human visual perception: pure yellow (hsl 60°, 100%, 50%) appears blindingly bright while pure blue (hsl 240°, 100%, 50%) appears nearly black at the same lightness value! OKLCH fixes this with mathematically uniform perceptual lightness, making accessible UI palettes and contrast math completely reliable in CSS and Tailwind v4.
How to Convert OKLCH to HEX Step-by-Step
- 1 Step 1: Linearize sRGB values to remove gamma encoding: c_lin = (c <= 0.04045) ? c / 12.92 : ((c + 0.055) / 1.055)^2.4.
- 2 Step 2: Transform linear sRGB to LMS cone coordinates via a 3x3 matrix.
- 3 Step 3: Take the cube root of LMS responses to match non-linear human visual reception.
- 4 Step 4: Multiply by the Oklab conversion matrix to produce L (Lightness), a (green-red), and b (blue-yellow).
- 5 Step 5: Convert rectangular (a, b) to polar cylindrical coordinates: Chroma C = sqrt(a² + b²), Hue H = atan2(b, a) in degrees.
OKLCH to HEX Frequently Asked Questions
Why is OKLCH better than HSL for UI design?
In OKLCH, lightness is perceptually uniform. If two colors have an OKLCH Lightness of 0.70, they have the exact same perceived brightness to the human eye, ensuring predictable WCAG contrast.
Is OKLCH supported in all modern browsers?
Yes! Chrome, Safari, Firefox, and Edge all support oklch() natively in CSS (95%+ global browser support). Tailwind CSS v4 uses OKLCH by default.
Can OKLCH represent Display P3 wide-gamut colors?
Yes. Unlike HEX and RGB which are locked to sRGB, OKLCH can describe colors across the entire visible spectrum including Apple Display P3 and Rec.2020.