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_kwargs (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

[HernandezAndresLR99], [KMH+02], [Wikipedia01a], [Wikipedia01b], [WS00d]

Examples

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