OKLab: Oklab Perceptual Cartesian Color Space

Cartesian sister space to OKLCH using perceptual Lightness (L) and opponent axes a (green-red) and b (blue-yellow) for straight-line blending.

Extension / Token.css
MIME / Media typetext/css
Gamut scopeWide Gamut (P3 / Unbounded)
Human readabilityMedium
Perceptual uniformityYes
Alpha channel supportYes
Best forSmooth CSS gradients without gray dead zones, color mixing, and image shaders
OKLab
CSS
oklab(54.6% -0.025 -0.214)

Strengths

  • Straight-line interpolation in OKLab yields vibrant, artifact-free gradients without hue snapping.
  • Default recommended space for CSS color-mix(in oklab, ...) and linear-gradient(in oklab, ...).
  • Eliminates the notorious CIELab blue-shift towards purple.

Trade-offs

  • Opponent axes (a, b) are harder to read intuitively by eye than OKLCH polar Hue and Chroma.

Convert & inspect OKLab locally

Related color engineering guides

OKLab frequently asked questions

When should I pick oklab() instead of oklch()?

Use oklch() for authoring human-readable palette tokens and oklab() when interpolating CSS gradients or blending two complementary colors smoothly.

How is OKLab converted to OKLCH?

Directly via polar coordinates: C = sqrt(a^2 + b^2) and H = atan2(b, a) in degrees, with identical L.