XYZ color representation (CIE 1931 color space)
More...
#include <colors.h>
|
| XYZ () |
| Default constructor initializes XYZ to (0,0,0)
|
|
| XYZ (const double x, const double y, const double z) |
| Construct XYZ from component values.
|
|
| XYZ (const RGB &rgb) |
| Construct XYZ from RGB color.
|
|
| XYZ (const Lab &lab, const std::array< double, 3 > &white_point={ 0.95047, 1, 1.08883 }) |
| Construct XYZ from Lab color.
|
|
| XYZ (const HSL &hsl) |
| Construct XYZ from HSL color.
|
|
| XYZ (const LCHab &lch, const std::array< double, 3 > &white_point={ 0.95047, 1, 1.08883 }) |
| Construct XYZ from LCHab color.
|
|
bool | operator== (const XYZ &other) const |
| equality operator for XYZ colors
|
|
bool | operator!= (const XYZ &other) const |
| inequality operator for XYZ colors
|
|
double | x () const |
| Get X component.
|
|
double | y () const |
| Get Y component (luminance)
|
|
double | z () const |
| Get Z component.
|
|
XYZ color representation (CIE 1931 color space)
Device-independent color space that serves as an intermediate for conversions between RGB and perceptually uniform spaces.
Definition at line 271 of file colors.h.
◆ XYZ() [1/5]
qualpal::colors::XYZ::XYZ |
( |
const double |
x, |
|
|
const double |
y, |
|
|
const double |
z |
|
) |
| |
Construct XYZ from component values.
- Parameters
-
x | X component (roughly red-like) |
y | Y component (luminance) |
z | Z component (roughly blue-like) |
◆ XYZ() [2/5]
qualpal::colors::XYZ::XYZ |
( |
const RGB & |
rgb | ) |
|
Construct XYZ from RGB color.
- Parameters
-
rgb | RGB color to convert from |
◆ XYZ() [3/5]
qualpal::colors::XYZ::XYZ |
( |
const Lab & |
lab, |
|
|
const std::array< double, 3 > & |
white_point = { 0.95047, 1, 1.08883 } |
|
) |
| |
Construct XYZ from Lab color.
- Parameters
-
lab | Lab color to convert from |
white_point | Reference white point (default: D65) |
◆ XYZ() [4/5]
qualpal::colors::XYZ::XYZ |
( |
const HSL & |
hsl | ) |
|
Construct XYZ from HSL color.
- Parameters
-
hsl | HSL color to convert from |
◆ XYZ() [5/5]
qualpal::colors::XYZ::XYZ |
( |
const LCHab & |
lch, |
|
|
const std::array< double, 3 > & |
white_point = { 0.95047, 1, 1.08883 } |
|
) |
| |
Construct XYZ from LCHab color.
- Parameters
-
lch | LCHab color to convert from |
white_point | Reference white point (default: D65) |
◆ operator!=()
bool qualpal::colors::XYZ::operator!= |
( |
const XYZ & |
other | ) |
const |
|
inline |
inequality operator for XYZ colors
- Parameters
-
other | Other XYZ color to compare with |
- Returns
- true if XYZ colors are not equal, false otherwise
Definition at line 336 of file colors.h.
◆ operator==()
bool qualpal::colors::XYZ::operator== |
( |
const XYZ & |
other | ) |
const |
|
inline |
equality operator for XYZ colors
- Parameters
-
other | Other XYZ color to compare with |
- Returns
- true if both XYZ colors are equal, false otherwise
Definition at line 325 of file colors.h.
◆ x()
double qualpal::colors::XYZ::x |
( |
| ) |
const |
|
inline |
Get X component.
Definition at line 339 of file colors.h.
◆ y()
double qualpal::colors::XYZ::y |
( |
| ) |
const |
|
inline |
Get Y component (luminance)
Definition at line 341 of file colors.h.
◆ z()
double qualpal::colors::XYZ::z |
( |
| ) |
const |
|
inline |
Get Z component.
Definition at line 343 of file colors.h.
The documentation for this class was generated from the following file: