LCH to OKLab Converter

Converted OKLab Output --
100%

Wide-Gamut & Linear Formats

Modern CSS color space notations derived from this color

Contrast Analysis (WCAG 2.1)

Checks the converted color against foreground or background targets for accessibility compliance.

How to Convert LCH to OKLab

Converting LCH to OKLab is an upgrade from a 1970s perceptual color model to a modern, highly optimized one. While LCH is excellent, it is based on the older CIELAB math, which has known flaws.

Why Upgrade to OKLab?

The most prominent flaw in CIELAB (and by extension, LCH) is the "blue shift." When transitioning from blue to white, the color shifts toward purple. It also struggles to maintain consistent perceived saturation across different hues.

OKLab was created in 2020 to fix these specific issues. It uses LMS (Long, Medium, Short) cone responses to better simulate how the human eye processes light. Gradients and color mixing done in OKLab are smooth, hue-stable, and free of the purple shift.

The Conversion Pipeline

You cannot map LCH coordinates directly to OKLab coordinates. The color must be translated back into a linear light space first.

  1. Convert LCH to CIELAB using trigonometry.
  2. Convert CIELAB to the CIE XYZ reference space.
  3. Convert XYZ to Linear sRGB.
  4. Multiply the Linear sRGB values by the OKLab transformation matrix to enter LMS cone space.
  5. Apply the OKLab non-linear curve and final matrix to get the new L, a, and b values.

Related Tools