Skip to content

LCh D50

The LCh D50 color space is registered in Color by default

Properties

Name: lch

White Point: D50 / 2˚

Coordinates:

Name Range*
l [0, 100]
c [0, 150]
h [0, 360)

* Space is not bound to the range and is only used as a reference to define percentage inputs/outputs in relation to the Display P3 color space.

CIELCh D50 3D

The sRGB gamut represented within the CIELCh D50 color space.

The "CIELCh" space is a color space based on CIELab, which uses the polar coordinates C* (chroma, relative saturation) and h° (hue angle, angle of the hue in the CIELab color wheel) instead of the Cartesian coordinates a* and b*. The CIELab lightness L* remains unchanged.

Learn about CIELCh

Channel Aliases

Channels Aliases
l lightness
c chroma
h hue

Input/Output

Parsed input and string output formats support all valid CSS forms. In addition, we also allow the color() function format using the custom name --lch:

lch(l c h / a)          // LCh function
color(--lch l c h / a)  // Color function

When manually creating a color via raw data or specifying a color space as a parameter in a function, the color space name is always used:

Color("lch", [0, 0, 0], 1)

The string representation of the color object will always default to the color(--lch l c h / a) form, but the default string output will be the lch(l c h / a) form.

>>> Color("lch", [54.291, 106.84, 40.858])
color(--lch 54.291 106.84 40.858 / 1)
>>> Color("lch", [75.59, 83.769, 70.824]).to_string()
'lch(75.59 83.769 70.824)'
>>> Color("lch", [97.607, 94.712, 99.572]).to_string(percent=True)
'lch(97.607% 63.141% 99.572)'
>>> Color("lch", [46.278, 67.984, 134.38]).to_string(color=True)
'color(--lch 46.278 67.984 134.38)'

Registering

from coloraide import Color as Base
from coloraide.spaces.lch import LCh

class Color(Base): ...

Color.register(LCh())