RGB to LCH Color Converter

Convert RGB to CIELCh (lightness, chroma, hue) cylindrical space

Ad placeholder (leaderboard)

Convert a screen sRGB color into CIELCh — the cylindrical form of CIELAB built from Lightness, Chroma, and Hue. Because it is grounded in CIELAB, LCH separates a color into perceptually meaningful controls, which makes it ideal for building even, accessible palettes.

How it works

LCH is CIELAB expressed in polar coordinates, so RGB is first converted to Lab, then a* and b* are turned into chroma and hue:

  1. RGB to Lab — gamma-expand each sRGB channel to linear light, apply the sRGB-to-XYZ matrix under the D65 white, then the CIELAB nonlinearity to get L*, a*, b*.
  2. Lab to LCh:
L = L*
C = sqrt(a*^2 + b*^2)
H = atan2(b*, a*) in degrees, normalised to 0-360

L is unchanged; chroma is the radial distance from the neutral gray axis (how vivid the color is); hue is the angle around the wheel.

Example

Convert rgb(59, 130, 246):

  • Lab ≈ L* 55.6, a* 17.6, b* −64.4
  • C = √(17.6² + 64.4²) ≈ 66.8
  • H = atan2(−64.4, 17.6) ≈ −75° → normalised to 285° (blue)
  • Result: lch(55.6% 66.8 285)

Notes

Hue is undefined for true grays (chroma ≈ 0) and is reported as 0 in that case. The D65 white point is used to match CSS lch(). Everything runs in your browser — nothing is uploaded.

Ad placeholder (rectangle)