colour.XYZ_to_Lab¶
-
colour.
XYZ_to_Lab
(XYZ, illuminant=array([ 0.3457, 0.3585]))[source]¶ Converts from CIE XYZ tristimulus values to CIE L*a*b* colourspace.
Parameters: - XYZ (array_like) – CIE XYZ tristimulus values.
- illuminant (array_like, optional) – Reference illuminant xy chromaticity coordinates or CIE xyY colourspace array.
Returns: CIE L*a*b* colourspace array.
Return type: ndarray
Notes
- Input CIE XYZ tristimulus values are in domain [0, 1].
- Input illuminant xy chromaticity coordinates or CIE xyY colourspace array are in domain [0, \(\infty\)].
- Output Lightness \(L^*\) is in range [0, 100].
References
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313]) >>> XYZ_to_Lab(XYZ) array([ 37.9856291..., -23.6290768..., -4.4174661...])