colour.XYZ_to_sRGB¶
-
colour.
XYZ_to_sRGB
(XYZ, illuminant=array([ 0.3127, 0.329 ]), chromatic_adaptation_transform=u'CAT02', apply_encoding_cctf=True)[source]¶ Converts from CIE XYZ tristimulus values to sRGB colourspace.
Parameters: - XYZ (array_like) – CIE XYZ tristimulus values.
- illuminant (array_like, optional) – Source illuminant chromaticity coordinates.
- chromatic_adaptation_transform (unicode, optional) – {‘CAT02’, ‘XYZ Scaling’, ‘Von Kries’, ‘Bradford’, ‘Sharp’, ‘Fairchild’, ‘CMCCAT97’, ‘CMCCAT2000’, ‘CAT02_BRILL_CAT’, ‘Bianco’, ‘Bianco PC’}, Chromatic adaptation transform.
- apply_encoding_cctf (bool, optional) – Apply sRGB encoding colour component transfer function / opto-electronic transfer function.
Returns: sRGB colour array.
Return type: ndarray
Notes
- Input CIE XYZ tristimulus values are in domain [0, 1].
Examples
>>> import numpy as np >>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313]) >>> XYZ_to_sRGB(XYZ) array([ 0.1749881..., 0.3881947..., 0.3216031...])