rgbToXyz static method
RGB coordinates are ranging in 0;1
and XYZ coordinates in 0;1
.
@param tuple An array containing the color's R,G,B values.
@return An array containing the resulting color's XYZ coordinates.
Implementation
static List<double> rgbToXyz(List<double> tuple) {
List<double> rgbl = [
toLinear(tuple[0]),
toLinear(tuple[1]),
toLinear(tuple[2])
];
return [
dotProduct(minv[0], rgbl),
dotProduct(minv[1], rgbl),
dotProduct(minv[2], rgbl)
];
}