colour.adaptation.chromatic_adaptation_VonKries¶
-
colour.adaptation.
chromatic_adaptation_VonKries
(XYZ, XYZ_w, XYZ_wr, transform=u'CAT02')[source]¶ Adapts given stimulus from test viewing conditions to reference viewing conditions.
Parameters: - XYZ (array_like) – CIE XYZ tristimulus values of stimulus to adapt.
- XYZ_w (array_like) – Test viewing condition CIE XYZ tristimulus values of whitepoint.
- XYZ_wr (array_like) – Reference viewing condition CIE XYZ tristimulus values of whitepoint.
- transform (unicode, optional) – {‘CAT02’, ‘XYZ Scaling’, ‘Von Kries’, ‘Bradford’, ‘Sharp’, ‘Fairchild’, ‘CMCCAT97’, ‘CMCCAT2000’, ‘CAT02_BRILL_CAT’, ‘Bianco’, ‘Bianco PC’}, Chromatic adaptation transform.
Returns: CIE XYZ_c tristimulus values of the stimulus corresponding colour.
Return type: ndarray
References
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313]) >>> XYZ_w = np.array([1.09846607, 1.00000000, 0.35582280]) >>> XYZ_wr = np.array([0.95042855, 1.00000000, 1.08890037]) >>> chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr) array([ 0.0839746..., 0.1141321..., 0.2862554...])
Using Bradford method:
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313]) >>> XYZ_w = np.array([1.09846607, 1.00000000, 0.35582280]) >>> XYZ_wr = np.array([0.95042855, 1.00000000, 1.08890037]) >>> transform = 'Bradford' >>> chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr, transform) ... array([ 0.0854032..., 0.1140122..., 0.2972149...])