GamutDesk Logo
GamutDesk

LCH to HEX Web Formatter

Convert LCH(ab) lightness, chroma and hue to a HEX code. Pipeline: LCH to Lab to XYZ to linear sRGB with out-of-gamut detection and clipping fallback.

Client-Side ArchitecturePrivate Client-Side Processing

Input

Result

HEX#577FD8
RGBrgb(87, 127, 216)

Technical Specification & Mathematical Principles

How the LCH to HEX Converter Works

The forward path is LCH to Lab (a* = C cos H, b* = C sin H), Lab to XYZ with the inverse CIE function and D65 white, XYZ to linear sRGB with the inverse matrix, and finally the sRGB transfer function to produce 8-bit channels.

High chroma values frequently fall outside the sRGB gamut. The tool detects channels outside 0 to 1, shows a gamut warning, and clips so the preview and HEX code always stay displayable. For hue-preserving gamut mapping consider reducing chroma until the color fits.

Frequently Asked Questions

Why do some LCH inputs show a gamut warning?
The sRGB gamut is a limited volume inside LCH. At a given lightness and hue, chroma beyond the boundary produces a color no sRGB display can show, so the result is clipped.
How can I keep the hue when a color is out of gamut?
Lower the chroma slider until the warning disappears. Reducing chroma along a constant lightness and hue is the standard way to map a color into gamut without shifting hue.
Are L values above 100 allowed?
The tool clamps L between 0 and 100. Values outside this range have no meaning for reflective colors in sRGB.

Related Design & Color Instruments