LABColor

LABColor[l,a,b]

represents a color in the CIELAB color space with lightness l and color components a and b.

LABColor[l,a,b,α]

specifies opacity α.

LABColor["string"]

returns a color from an HTML color name etc.

LABColor[color]

returns the CIELAB representation of color.

Details

  • LABColor is a color space that expresses colors as a level of perceptual lightness l, a red-green component a and a yellow-blue component b, composing the four unique colors in human vision.
  • LABColor is designed to have perceptual uniformity; i.e. equal changes in its components will be perceived by a human to have equal effects.
  • LABColor is the basis for ColorDistance.
  • LABColor is device independent and corresponds to the CIE 1976 color space with .
  • The parameters have the following interpretation:
  • llightness or approximate luminance
    acolor, green (negative) to magenta (positive)
    bcolor, blue (negative) to yellow (positive)
  • The parameters , and are given by , 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 .
  • ColorConvert can be used to convert LABColor to other color spaces.
  • LABColor allows any real number for l, a, and b.
  • RGBColor approximately corresponds to l between 0 and 1, a between and , and b between and .
  • If no opacity has been specified, LABColor[l,a,b] is equivalent to LABColor[l,a,b,1].
  • LABColor[l,a,b,α] is equivalent to {LABColor[l,a,b],Opacity[α]}.
  • The alternative forms LABColor[{l,a,b}] and LABColor[{l,a,b,α}] can also be used. »
  • {LABColor[], p1, } indicates that graphics primitives pi should be displayed in the color given.
  • The following wrappers can be used around colors:
  • ColorsNear[color,]specifies a region around color
    Directive[,color,]specifies a color in combination with other directives »
    Glow[color]specifies color independent of lighting »
    Opacity[a,color]specifies a color with an opacity a
    Style[expr,color]displays expr with the specified color »
  • For 3D surfaces, explicit LABColor directives define surface colors; the final shading depends on lighting and contributions from specularity and glow. »

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  (3)

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  (2)

Use Blend to mix two or more colors:

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

Generalizations & Extensions  (2)

LABColor[{l,a,b}] is equivalent to LABColor[l,a,b]:

Use Opacity with LABColor:

Use the opacity argument in LABColor directly:

Applications  (2)

Define a color negation using LABColor:

ColorNegate by default operates using RGBColor:

If color negation is defined as LABColor[l,-a,-b] the lightness is preserved:

Show a bubble chart of color distribution using the a and b channels of the CIELAB color space:

A 3D bubble chart:

Properties & Relations  (3)

The RGB gamut in CIELAB color space:

Blend of LABColor directives happens in the CIELAB parameter space:

ColorDistance by default computes the EuclideanDistance in the CIELAB color space:

Neat Examples  (1)

Visualizing the color space:

Wolfram Research (2014), LABColor, Wolfram Language function, https://reference.wolfram.com/language/ref/LABColor.html (updated 2021).

Text

Wolfram Research (2014), LABColor, Wolfram Language function, https://reference.wolfram.com/language/ref/LABColor.html (updated 2021).

CMS

Wolfram Language. 2014. "LABColor." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/LABColor.html.

APA

Wolfram Language. (2014). LABColor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LABColor.html

BibTeX

@misc{reference.wolfram_2024_labcolor, author="Wolfram Research", title="{LABColor}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/LABColor.html}", note=[Accessed: 24-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_labcolor, organization={Wolfram Research}, title={LABColor}, year={2021}, url={https://reference.wolfram.com/language/ref/LABColor.html}, note=[Accessed: 24-November-2024 ]}