colour.xy_to_xyY#
- colour.xy_to_xyY(xy: ArrayLike, Y: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1] = 1) Annotated[ndarray[tuple[Any, ...], dtype[float16 | float32 | float64]], 1][source]#
Convert from CIE xy chromaticity coordinates to CIE xyY colourspace by extending the array’s last dimension with the specified \(Y\) luminance.
xyargument with last dimension equal to 3 will be assumed to be a CIE xyY colourspace array and will be returned directly by the definition.- Parameters:
xy (ArrayLike) – CIE xy chromaticity coordinates or CIE xyY colourspace array.
Y (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) – 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:
Notes
Domain
Scale - Reference
Scale - 1
xy1
1
Y1
1
Range
Scale - Reference
Scale - 1
xyY1
1
This definition is a convenient object provided to implement support of illuminant argument luminance value in various
colour.modelspackage objects such ascolour.Lab_to_XYZ()orcolour.Luv_to_XYZ().
References
[CIET14804f], [Wikipedia05d]
Examples
>>> xy = np.array([0.54369557, 0.32107944]) >>> xy_to_xyY(xy) array([ 0.5436955..., 0.3210794..., 1. ]) >>> xy = np.array([0.54369557, 0.32107944, 1.00000000]) >>> xy_to_xyY(xy) array([ 0.5436955..., 0.3210794..., 1. ]) >>> xy = np.array([0.54369557, 0.32107944]) >>> xy_to_xyY(xy, 100) array([ 0.5436955..., 0.3210794..., 100. ])