Constant srgb::xyz::XYZ_FROM_SRGB_MATRIX[][src]

pub const XYZ_FROM_SRGB_MATRIX: [[f32; 3]; 3];

The basis conversion matrix for moving from linear sRGB space to XYZ colour space.

To perform the conversion it’s typically more convenient to use the xyz_from_linear() function instead of accessing this constant.

The matrix is built with the assumption that colours are represented as one-column matrices. With that, converting from sRGB to XYZ is done by the following formula: XYZ = XYZ_FROM_SRGB_MATRIX ✕ RGB.