TXT · Text & Data tools

HEX to OKLab Converter

Active color#000000
Hex Input
OKLab Output
1Active Line0Valid Items
Go To Full Color Converter

Convert HEX color codes into OKLab, a newer perceptually uniform color space designed to correct hue-shift problems in older models like CIELAB.

Input formats

Provide colors as 3, 4, 6, or 8-digit hex codes, with or without a leading #. Each line is parsed independently in batch mode.

OKLab output

#FF5733 becomes oklab(68.04% 0.1747 0.1165). Lightness prints as a percentage; the a and b axes print as small signed numbers, usually within about -0.4 to 0.4.

Why OKLab exists

CIELAB, published in 1976, shifts hue and saturation unevenly in some regions as lightness changes, which shows up as unwanted color casts in gradients and blends. OKLab was designed in 2020 to keep hue steadier across the same lightness and chroma range, and now backs CSS Color 4 features like oklch() and color-mix() in the OKLab space.

Frequently Asked Questions

3, 4, 6, or 8-digit hex codes with or without the leading #, such as #FF5733 or FF5733. Paste one color per line for batch conversion.

L is lightness from 0% to 100%. a runs from green (negative) to red (positive), and b runs from blue (negative) to yellow (positive), each typically within roughly -0.4 to 0.4.

Both separate lightness from two color axes, but OKLab was published in 2020 specifically to fix cases where CIELAB's hue shifts unevenly as lightness or chroma changes. It's the model behind CSS Color 4 functions like oklch() and the oklab color-mix() interpolation space.

Try one of our format-specific converters below

Full Color Converter tool

Explore Our Tools

Browse all tools