colour.XYZ_to_Lab

colour.XYZ_to_Lab(XYZ, illuminant=array([ 0.3127, 0.329 ]))[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

Domain Scale - Reference Scale - 1
XYZ [0, 1] [0, 1]
illuminant [0, 1] [0, 1]
Range Scale - Reference Scale - 1
Lab

L : [0, 100]

a : [-100, 100]

b : [-100, 100]

L : [0, 1]

a : [-1, 1]

b : [-1, 1]

References

[CIET14804f]

Examples

>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
>>> XYZ_to_Lab(XYZ)  # doctest: +ELLIPSIS
array([ 41.5278752...,  52.6385830...,  26.9231792...])