colour.adaptation.chromatic_adaptation_vK20#
- colour.adaptation.chromatic_adaptation_vK20(XYZ: ArrayLike, 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]#
Adapt given stimulus from previous viewing conditions to adapting viewing conditions using Von Kries 2020 (vK20) method.
- Parameters:
XYZ (ArrayLike) – CIE XYZ tristimulus values of stimulus to adapt.
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:
CIE XYZ_c tristimulus values of the stimulus corresponding colour.
- Return type:
Notes
Domain
Scale - Reference
Scale - 1
XYZ
[0, 1]
[0, 1]
XYZ_p
[0, 1]
[0, 1]
XYZ_n
[0, 1]
[0, 1]
XYZ_r
[0, 1]
[0, 1]
Range
Scale - Reference
Scale - 1
XYZ_a
[0, 1]
[0, 1]
References
[Fai20]
Examples
>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) >>> XYZ_p = np.array([0.95045593, 1.00000000, 1.08905775]) >>> XYZ_n = np.array([0.96429568, 1.00000000, 0.82510460]) >>> chromatic_adaptation_vK20(XYZ, XYZ_p, XYZ_n) ... array([ 0.2146884..., 0.1245616..., 0.0466255...])
Using Bradford transform:
>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) >>> XYZ_p = np.array([0.95045593, 1.00000000, 1.08905775]) >>> XYZ_n = np.array([0.96429568, 1.00000000, 0.82510460]) >>> transform = "Bradford" >>> chromatic_adaptation_vK20(XYZ, XYZ_p, XYZ_n, transform=transform) ... array([ 0.2153837..., 0.1250885..., 0.0466455...])