colour.adaptation.matrix_chromatic_adaptation_VonKries#
- colour.adaptation.matrix_chromatic_adaptation_VonKries(XYZ_w: ArrayLike, XYZ_wr: ArrayLike, transform: LiteralChromaticAdaptationTransform | str = 'CAT02') NDArrayFloat [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 (LiteralChromaticAdaptationTransform | 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
[Fai13a]
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 transform:
>>> XYZ_w = np.array([0.95045593, 1.00000000, 1.08905775]) >>> XYZ_wr = np.array([0.96429568, 1.00000000, 0.82510460]) >>> transform = "Bradford" >>> matrix_chromatic_adaptation_VonKries(XYZ_w, XYZ_wr, transform) ... array([[ 1.0479297..., 0.0229468..., -0.0501922...], [ 0.0296278..., 0.9904344..., -0.0170738...], [-0.0092430..., 0.0150551..., 0.7518742...]])