OKLab to HEX Converter — Free Online Tool

Convert OKLab color values to HEX in seconds — enter L, a, and b to get an instant HEX code, or flip the toggle to convert any HEX color to OKLab. No signup required.

FAQ

What is OKLab?
OKLab is a perceptual color space designed so that equal numeric changes in L, a, or b produce equal perceived changes in color. Unlike RGB or HEX, where a jump from one value to another can look bigger or smaller depending on the color, OKLab’s three coordinates line up with how the human eye actually experiences lightness (L), green-to-red (a), and blue-to-yellow (b).

How accurate is OKLab to HEX conversion?
This converter uses the standard OKLab-to-linear-sRGB matrix transform, the same math used in CSS’s native oklab() color function, so the HEX output is mathematically exact for any in-gamut color. Some OKLab values describe colors more vivid than a screen can display — when that happens, the tool clamps to the closest displayable HEX and flags it, rather than returning a distorted result.

Why does my HEX color look different once converted to OKLab and back?
If a color falls outside the sRGB gamut that HEX and most screens can represent, converting it to OKLab and back will land on the nearest color a screen can actually show. This is a display limitation, not a rounding error in the conversion itself — the tool’s gamut warning tells you when this clamping has happened.

Scroll to Top