LCH to HEX and RGB converter

Pick the lightness, chroma and hue you want and get the code to use in your design or stylesheet.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter lightness l*, chroma c*, hue angle h and reference white.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

a = C cos(h), b = C sin(h), and L stays the same. Lab is then converted to XYZ and to linear RGB with the inverse sRGB matrix. Linear RGB is then encoded per IEC 61966-2-1: 12.92 l if l ≤ 0.0031308, else 1.055 l^(1/2.4) − 0.055, times 255 and rounded.

Example

Inputs: Lightness L* = 60, Chroma C* = 50, Hue angle h = 120 °, Reference white = D65 daylight, no adaptation (sRGB white). Result: HEX code: #7D9B40; Gamut status: Inside the sRGB gamut.

Limits and caveats

  • Colors outside sRGB have their channels clipped to 0-255, which shifts the displayed color.
  • Clipping does not preserve hue and lightness the way chroma reduction in modern CSS engines does.

Questions about this tool

How do I find the maximum chroma for a hue?

Raise C step by step until the out of gamut message appears; the last value before it is the sRGB limit at that lightness and hue.

Does hue 0 mean red?

Roughly. 0° is on the positive a* axis (a pinkish red), 90° is yellow, 180° green and 270° blue.

Why does D65 give a different result from D50?

The same LCH numbers describe a different color under each reference white, so pick the white your values came from.