qualpal::colors::XYZ
C++ · cpp · 4.1.0
XYZ color representation (CIE 1931 color space).
Represents a color in the device-independent CIE 1931 XYZ color space. Used as an intermediate for conversions between RGB and perceptually uniform spaces (Lab, LCHab, DIN99d).
X: [0, ~0.95] (roughly red-like)
Y: [0, 1] (luminance)
Z: [0, ~1.09] (roughly blue-like)
Most conversions use the D65 reference white point by default.
// Create XYZ from RGB
XYZ ;
// Modify whitepoint
XYZ ; // D50See also
RGB, Lab, LCHab, DIN99d for conversions.
Methods
XYZ
XYZ
Source: include/qualpal/colors.h
Default constructor initializes XYZ to (0,0,0).
XYZ
Source: include/qualpal/colors.h
Parameters
hsl
HSL color to convert from
XYZ
Source: include/qualpal/colors.h
Construct XYZ from LCHab color.
Parameters
lch
LCHab color to convert from
white_point
Reference white point (default: D65)
XYZ
Source: include/qualpal/colors.h
Parameters
lab
Lab color to convert from
white_point
Reference white point (default: D65)
XYZ
Source: include/qualpal/colors.h
Parameters
rgb
RGB color to convert from
XYZ
Source: include/qualpal/colors.h
Construct XYZ from component values.
Parameters
x
X component (roughly red-like)
y
Y component (luminance)
z
Z component (roughly blue-like)
operator!=
Source: include/qualpal/colors.h
inline bool inequality operator for XYZ colors
Parameters
other
Other XYZ color to compare with
Returns
true if XYZ colors are not equal, false otherwise
operator==
Source: include/qualpal/colors.h
inline bool equality operator for XYZ colors
Parameters
other
Other XYZ color to compare with
Returns
true if both XYZ colors are equal, false otherwise
x
Source: include/qualpal/colors.h
inline double Get X component.
y
Source: include/qualpal/colors.h
inline double Get Y component (luminance).
z
Source: include/qualpal/colors.h
inline double Get Z component.
