class Color::XYZ

A Color object for the CIE 1931 XYZ color space derived from the original CIE RGB color space as linear transformation functions x̅(λ), y̅(λ), and z̅(λ) that describe the device-independent CIE standard observer. It underpins most other CIE color systems (such as CIELAB), but is directly used mostly for color instrument readings and color space transformations particularly in color profiles.

The XYZ color space ranges describe the mixture of wavelengths of light required to stimulate cone cells in the human eye, as well as the luminance (brightness) required. The Y component describes the luminance while the X and Z components describe two axes of chromaticity. Definitionally, the minimum value for any XYZ color component is 0.

As XYZ describes imaginary colors, the color gamut is usually expressed in relation to a reference white of an illuminant (frequently often D65 or D50) and expressed as the xyY color space, computed as:

x = X / (X + Y + Z)
y = Y / (X + Y + Z)
Y = Y

The range of Y values is conventionally clamped to 0..100, whereas the X and Z values must be no lower than 0 and on the same scale.

For more details, see CIE XYZ color space.

XYZ colors are immutable Data class instances. Array deconstruction is [x * 100, y * 100, z * 100] and hash deconstruction is {x:, y:, z:} (see x, y, z).