This function first linearizes the RGB color values (removes gamma correction),
then applies the RGB to XYZ transformation matrix. Optionally, it can perform
chromatic adaptation to convert from the D65 white point (standard for RGB)
to the D50 white point (commonly used in other color spaces).
Converts an RGB color to the CIE XYZ color space.
This function first linearizes the RGB color values (removes gamma correction), then applies the RGB to XYZ transformation matrix. Optionally, it can perform chromatic adaptation to convert from the D65 white point (standard for RGB) to the D50 white point (commonly used in other color spaces).