tests: replace mat2XYZ
The primaries and the white point are the fundamental definition of the color spaces in these tests. Instead of hard-coding mat2XYZ, use LittleCMS to derive the result from the fundamental definition. This removes derived hard-coded constants, which is a benefit in itself. How these constants were originally produced was not mentioned in 0c5860fa but I was able to reproduce them with python3: import colour import numpy as np x = colour.RGB_COLOURSPACES['sRGB'] w_d50 = np.array([0.34567, 0.35850]) print(x.chromatically_adapt(w_d50, 'D50', 'Bradford')) It's identical to 3-4 decimals of the hardcoded values, and also for Adobe RGB. I printed the LittleCMS generated values as well, and they are the same as with python up to roughly 4 decimals. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Loading