LCHColor

LCHColor[l,c,h]

is a color directive with lightness l, chroma c, and hue h.

LCHColor[l,c,h,α]

specifies opacity α.

Details

  • LCHColor is a perceptual color space corresponding to a cylindrical transformation of LABColor with the a and b components represented in polar form in terms of c and h, allowing for easier interpretation of color parameters.
  • LCHColor is device independent and corresponds to the CIE color space with .
  • The parameters have the following interpretation:
  • llightness, approximate luminance
    cchroma, color saturation
    hhue, cyclic color from red to yellow to green to blue
  • , , and where TemplateBox[{a, *}, Superscript]=500 (f(x/x_n)-f(y/y_n)), and TemplateBox[{b, *}, Superscript]=200 (f(y/y_n)-f(z/z_n)) where , , and are color parameters, , , and are white point parameters in XYZColor, and is a piecewise function that is equal to for and for .
  • LCHColor allows any real number for l, c, and h.
  • RGBColor approximately corresponds to l between 0 and 1, c between 0 and 1.3, and h between 0 and 1.
  • ColorConvert can be used to convert LCHColor to other color spaces.
  • The alternative forms LCHColor[{l,c,h}] and LCHColor[{l,c,h,α}] can also be used. »
  • {LCHColor[],p1,} indicates that graphics primitives pi should be displayed in the color given.
  • Style[expr,LCHColor[]] specifies that expr should be displayed with the specified color. »
  • For 3D surfaces, explicit LCHColor directives define surface colors; the final shading depends on lighting and contributions from specularity and glow. »
  • Glow[LCHColor[]] specifies color independent of lighting. »
  • LCHColor[l,c,h,α] is equivalent to Directive[LCHColor[l,c,h],Opacity[α]]. »
  • If no opacity has been specified, LCHColor[l,c,h] is equivalent to LCHColor[l,c,h,1].

Examples

open allclose all

Basic Examples  (4)

Specify the color of graphics primitives:

Specify the color with opacity:

Specify the output color of expressions:

Specify the color of plots:

Scope  (2)

Colors in 3D  (1)

Use diffuse surface color:

Use diffuse and specular surface color:

Use glow color, setting the diffuse surface color to black:

Color Operations  (1)

Use Lighter and Darker to mix with white and black, respectively:

Generalizations & Extensions  (2)

LCHColor[{l,c,h}] is equivalent to LCHColor[l,c,h]:

Use Opacity with LCHColor:

Use the opacity argument in LCHColor directly:

Applications  (1)

Perform a color desaturation by lowering the chroma while preserving luminance and hue:

Properties & Relations  (2)

LCHColor is a cylindrical transformation of LABColor:

Blend of LCHColor directives happens in LCh parameter space:

Interactive Examples  (1)

Perform dynamic color adaptation in LCh:

Neat Examples  (1)

Visualizing the color space:

Introduced in 2014
 (10.0)