The OpenD Programming Language

RGB.tristimulus

Return the RGB tristimulus values as a tuple. These will always be ordered (R, G, B). Any color channels not present will be 0.

struct RGB(string components_, ComponentType_, bool linear_ = false, RGBColorSpace colorSpace_ = RGBColorSpace.sRGB)
@safe pure nothrow @nogc @property const
tristimulus
()
if (
isNumeric!ComponentType_
)

Examples

// tristimulus returns tuple of R, G, B
static assert(BGR8(255, 128, 10).tristimulus == tuple(NormalizedInt!ubyte(255), NormalizedInt!ubyte(128), NormalizedInt!ubyte(10)));

Meta