colour.adaptation.matrix_chromatic_adaptation_VonKries¶
- colour.adaptation.matrix_chromatic_adaptation_VonKries(XYZ_w: ArrayLike, XYZ_wr: ArrayLike, transform: Union[Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'], str] = 'CAT02') numpy.ndarray [source]¶
Compute the chromatic adaptation matrix from test viewing conditions to reference viewing conditions.
- Parameters
XYZ_w (ArrayLike) – Test viewing conditions CIE XYZ tristimulus values of whitepoint.
XYZ_wr (ArrayLike) – Reference viewing conditions CIE XYZ tristimulus values of whitepoint.
transform (Union[Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'], str]) – Chromatic adaptation transform.
- Returns
Chromatic adaptation matrix \(M_{cat}\).
- Return type
Notes
Domain
Scale - Reference
Scale - 1
XYZ_w
[0, 1]
[0, 1]
XYZ_wr
[0, 1]
[0, 1]
References
[Fai13b]
Examples
>>> XYZ_w = np.array([0.95045593, 1.00000000, 1.08905775]) >>> XYZ_wr = np.array([0.96429568, 1.00000000, 0.82510460]) >>> matrix_chromatic_adaptation_VonKries(XYZ_w, XYZ_wr) ... array([[ 1.0425738..., 0.0308910..., -0.0528125...], [ 0.0221934..., 1.0018566..., -0.0210737...], [-0.0011648..., -0.0034205..., 0.7617890...]])
Using Bradford method:
>>> XYZ_w = np.array([0.95045593, 1.00000000, 1.08905775]) >>> XYZ_wr = np.array([0.96429568, 1.00000000, 0.82510460]) >>> method = 'Bradford' >>> matrix_chromatic_adaptation_VonKries(XYZ_w, XYZ_wr, method) ... array([[ 1.0479297..., 0.0229468..., -0.0501922...], [ 0.0296278..., 0.9904344..., -0.0170738...], [-0.0092430..., 0.0150551..., 0.7518742...]])