colour.adaptation.matrix_chromatic_adaptation_vk20#

colour.adaptation.matrix_chromatic_adaptation_vk20(XYZ_p: ArrayLike, XYZ_n: ArrayLike, XYZ_r: ArrayLike = TVS_XYZ_R_VK20, transform: Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'] | str = 'CAT02', coefficients: Coefficients_DegreeOfAdaptation_vK20 = CONDITIONS_DEGREE_OF_ADAPTATION_VK20['Fairchild']) NDArrayFloat[source]#

Compute the chromatic adaptation matrix from previous viewing conditions to adapting viewing conditions using Von Kries 2020 (vK20) method.

Parameters:
  • XYZ_p (ArrayLike) – Previous viewing conditions CIE XYZ tristimulus values of whitepoint.

  • XYZ_n (ArrayLike) – Adapting viewing conditions CIE XYZ tristimulus values of whitepoint.

  • XYZ_r (ArrayLike) – Reference viewing conditions CIE XYZ tristimulus values of whitepoint.

  • transform (Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'] | str) – Chromatic adaptation transform.

  • coefficients (Coefficients_DegreeOfAdaptation_vK20) – vK20 degree of adaptation coefficients.

Returns:

Chromatic adaptation matrix \(M_{cat}\).

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

XYZ_p

[0, 1]

[0, 1]

XYZ_n

[0, 1]

[0, 1]

XYZ_r

[0, 1]

[0, 1]

References

[Fai20]

Examples

>>> XYZ_p = np.array([0.95045593, 1.00000000, 1.08905775])
>>> XYZ_n = np.array([0.96429568, 1.00000000, 0.82510460])
>>> matrix_chromatic_adaptation_vk20(XYZ_p, XYZ_n)
... 
array([[  1.0279139...e+00,   2.9137117...e-02,  -2.2794068...e-02],
       [  2.0702840...e-02,   9.9005316...e-01,  -9.2143464...e-03],
       [ -6.3758553...e-04,  -1.1577319...e-03,   9.1296320...e-01]])

Using Bradford transform:

>>> XYZ_p = np.array([0.95045593, 1.00000000, 1.08905775])
>>> XYZ_n = np.array([0.96429568, 1.00000000, 0.82510460])
>>> transform = "Bradford"
>>> matrix_chromatic_adaptation_vk20(XYZ_p, XYZ_n, transform=transform)
... 
array([[ 1.0367230...,  0.0195580..., -0.0219321...],
       [ 0.0276321...,  0.9822296..., -0.0082419...],
       [-0.0029508...,  0.0040690...,  0.9102430...]])