The OpenD Programming Language

Lab

A CIE L*a*b* color, parameterised for component type and white point.

Lab is a color space that describes all colors visible to the human eye and was created to serve as a device-independent model to be used as a reference. L* represents the lightness of the color; L* = 0 yields black and L* = 100 indicates diffuse white, specular white may be higher. a* represents the position between red/magenta and green; negative values indicate green while positive values indicate magenta. b* represents the position between yellow and blue; negative values indicate blue and positive values indicate yellow.

Lab is often found using default white point D50, but it is also common to use D65 when interacting with sRGB images.

Constructors

this
this(F L, F a, F b)

Construct a color from L*a*b* values.

Members

Aliases

ComponentType
alias ComponentType = F

Type of the color components.

Functions

opBinary
typeof(this) opBinary(S rh)

Binary operators.

opBinary
typeof(this) opBinary(typeof(this) rh)

Binary operators.

opCast
Color opCast()

Cast to other color types.

opOpAssign
typeof(this) opOpAssign(typeof(this) rh)

Binary assignment operators.

opOpAssign
typeof(this) opOpAssign(S rh)

Binary assignment operators.

opUnary
typeof(this) opUnary()

Unary operators.

perceptualDistance
F perceptualDistance(Lab!G c)

Returns the perceptual distance between the specifies colors.

Manifest constants

whitePoint
enum whitePoint;

The color components that were specified.

Variables

L
F L;

L* (lightness) component.

a
F a;

a* component. Negative values indicate green, positive values indicate magenta.

b
F b;

b* component. Negative values indicate blue, positive values indicate yellow.

Meta