colour.chromatically_adapted_primaries

colour.chromatically_adapted_primaries(primaries, whitepoint_t, whitepoint_r, chromatic_adaptation_transform='CAT02')[source]

Chromatically adapts given primaries \(xy\) chromaticity coordinates from test whitepoint_t to reference whitepoint_r.

Parameters
  • primaries (array_like, (3, 2)) – Primaries \(xy\) chromaticity coordinates.

  • whitepoint_t (array_like) – Test illuminant / whitepoint \(xy\) chromaticity coordinates.

  • whitepoint_r (array_like) – Reference illuminant / whitepoint \(xy\) chromaticity coordinates.

  • chromatic_adaptation_transform (str, optional) – {‘CAT02’, ‘XYZ Scaling’, ‘Von Kries’, ‘Bradford’, ‘Sharp’, ‘Fairchild’, ‘CMCCAT97’, ‘CMCCAT2000’, ‘CAT02 Brill 2008’, ‘CAT16’, ‘Bianco 2010’, ‘Bianco PC 2010’}, Chromatic adaptation transform.

Returns

Chromatically adapted primaries \(xy\) chromaticity coordinates.

Return type

ndarray

Examples

>>> p = np.array([0.64, 0.33, 0.30, 0.60, 0.15, 0.06])
>>> w_t = np.array([0.31270, 0.32900])
>>> w_r = np.array([0.34570, 0.35850])
>>> chromatic_adaptation_transform = 'Bradford'
>>> chromatically_adapted_primaries(p, w_t, w_r,
...                                 chromatic_adaptation_transform)
... 
array([[ 0.6484414...,  0.3308533...],
       [ 0.3211951...,  0.5978443...],
       [ 0.1558932...,  0.0660492...]])