colour.XYZ_to_xy#

colour.XYZ_to_xy(XYZ: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) NDArrayFloat[source]#

Convert from CIE XYZ tristimulus values to CIE xy chromaticity coordinates.

Parameters:

XYZ (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) – CIE XYZ tristimulus values.

Returns:

CIE xy chromaticity coordinates.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

XYZ

1

1

References

[CIET14804f], [Wikipedia05d]

Examples

>>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
>>> XYZ_to_xy(XYZ)
array([ 0.5436955...,  0.3210794...])