colour.xy_to_xyY¶
-
colour.
xy_to_xyY
(xy, Y=1)[source]¶ Converts from xy chromaticity coordinates to CIE xyY colourspace by extending the array last dimension with given \(Y\) luminance.
xy
argument with last dimension being equal to 3 will be assumed to be a CIE xyY colourspace array argument and will be returned directly by the definition.Parameters: - xy (array_like) – xy chromaticity coordinates or CIE xyY colourspace array.
- Y (numeric, optional) – Optional \(Y\) luminance value used to construct the CIE xyY colourspace array, the default \(Y\) luminance value is 1.
Returns: CIE xyY colourspace array.
Return type: ndarray
Notes
Domain Scale - Reference Scale - 1 xy
[0, 1] [0, 1] Range Scale - Reference Scale - 1 xyY
[0, 1] [0, 1] - This definition is a convenient object provided to implement support of
illuminant argument luminance value in various
colour.models
package objects such ascolour.Lab_to_XYZ()
orcolour.Luv_to_XYZ()
.
References
Examples
>>> xy = np.array([0.54369557, 0.32107944]) >>> xy_to_xyY(xy) # doctest: +ELLIPSIS array([ 0.5436955..., 0.3210794..., 1. ]) >>> xy = np.array([0.54369557, 0.32107944, 1.00000000]) >>> xy_to_xyY(xy) # doctest: +ELLIPSIS array([ 0.5436955..., 0.3210794..., 1. ]) >>> xy = np.array([0.54369557, 0.32107944]) >>> xy_to_xyY(xy, 100) # doctest: +ELLIPSIS array([ 0.5436955..., 0.3210794..., 100. ])