xyY

A CIE 1931 xyY color, parameterised for component type.

Constructors

this
this(ComponentType x, ComponentType y, ComponentType Y)

Construct a color from xyY values.

Members

Aliases

ComponentType
alias ComponentType = F

Type of the color components.

ParentColor
alias ParentColor = XYZ!ComponentType
Undocumented in source.

Functions

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

Binary operators.

opBinary
typeof(this) opBinary(S 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.

Static functions

convertColorImpl
To convertColorImpl(From color)
Undocumented in source. Be warned that the author may not have intended to support it.
convertColorImpl
To convertColorImpl(From color)
Undocumented in source. Be warned that the author may not have intended to support it.
convertColorImpl
To convertColorImpl(From color)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

Y
F Y;

Y value (luminance).

x
F x;

x coordinate.

y
F y;

y coordinate.

Examples

// CIE xyY 1931 color with double components
alias xyYd = xyY!double;

xyYd c = xyYd(0.4, 0.5, 1);

// test xyY operators and functions
static assert(xyYd(0, 0.5, 0) + xyYd(0.5, 0.5, 1) == xyYd(0.5, 1, 1));
static assert(xyYd(0.5, 0.5, 1) * 100.0 == xyYd(50, 50, 100));

Meta