GamutDesk Logo
GamutDesk

Modern HEX to LCH Converter

Convert HEX to LCH(ab) through the full sRGB, CIE-XYZ, CIE-Lab pipeline. Get lightness, chroma and hue angle with copy-ready output, 100% client-side.

Client-Side ArchitecturePrivate Client-Side Processing

Input

Result

L (lightness)55.63
C (chroma)66.77
H (hue)285.23°
LCH55.63, 66.77, 285.23
CSS lch()lch(55.6% 66.8 285.2)

Technical Specification & Mathematical Principles

How the HEX to LCH Converter Works

The pipeline is sRGB to linear RGB (inverse gamma), linear RGB to CIE-XYZ with the D65 matrix, XYZ to CIE-Lab with the CIE cube-root function, and finally Lab to LCH with C = sqrt(a*^2 + b*^2) and H = atan2(b*, a*).

Every step is deterministic and runs on the main thread in well under a millisecond, so the readouts update on each keystroke. The cylindrical LCH form makes it easy to compare colors by perceived lightness (L), colorfulness (C) and hue angle (H) instead of by RGB channels.

Frequently Asked Questions

How is LCH different from OKLCH?
Both are cylindrical forms of a perceptual space. LCH comes from CIE-Lab (1976) and is known to bend blue hues toward purple. OKLCH is based on OKLab (2020), which fixes the hue linearity problem. Use hex-to-oklch for modern CSS work.
What are typical values for a mid blue?
A color such as #3B82F6 has L around 56, chroma around 67 and a hue angle near 285 degrees. Reds sit near 40 degrees, yellows near 100, greens near 135.
Is the conversion exact?
It uses exact CIE constants and 7-digit matrices, so values are accurate to about 0.01. HEX itself is 8-bit quantized, which limits the precision of the input.

Related Design & Color Instruments