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.

Functions

opCast
Color opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin ColorOperators!(TypeTuple!("x", "y", "Y"))
Undocumented in source.

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