Construct a color from XYZ values.
Type of the color components.
Return the XYZ tristimulus values as a tuple.
// CIE XYZ 1931 color with float components alias XYZf = XYZ!float; XYZf c = XYZf(0.8, 1, 1.2); // tristimulus() returns a tuple of the components assert(c.tristimulus == tuple(c.X, c.Y, c.Z)); // test XYZ operators and functions static assert(XYZf(0, 0.5, 0) + XYZf(0.5, 0.5, 1) == XYZf(0.5, 1, 1)); static assert(XYZf(0.5, 0.5, 1) * 100.0 == XYZf(50, 50, 100));
A CIE 1931 XYZ color, parameterised for component type.