colour.xy_to_CCT

colour.xy_to_CCT(xy, method='CIE Illuminant D Series')[source]

Returns the correlated colour temperature \(T_{cp}\) from given CIE xy chromaticity coordinates using given method.

Parameters:
  • xy (array_like) – CIE xy chromaticity coordinates.
  • method (unicode, optional) – {‘CIE Illuminant D Series’, ‘Kang 2002’, ‘Hernandez 1999’, ‘McCamy 1992’}, Computation method.
Other Parameters:
 

optimisation_parameters (dict_like, optional) – {colour.temperature.xy_to_CCT_CIE_D(), colour.temperature.xy_to_CCT_Kang2002()}, Parameters for scipy.optimize.minimize() definition.

Returns:

Correlated colour temperature \(T_{cp}\).

Return type:

numeric or ndarray

References

[Hernandez-Andres1999a], [Kang2002a], [Wikipedia2001], [Wikipedia2001a], [Wyszecki2000z]

Examples

>>> import numpy as np
>>> xy_to_CCT(np.array([0.31270, 0.32900]))  # doctest: +ELLIPSIS
6508.1175148...
>>> xy_to_CCT(np.array([0.31270, 0.32900]), 'Hernandez 1999')
... # doctest: +ELLIPSIS
6500.7420431...