110 RGB(
const double r,
const double g,
const double b);
116 RGB(
const std::array<double, 3> rgb);
136 :
RGB(std::string(
hex)) {};
169 return (r_value == other.r_value) && (g_value == other.g_value) &&
170 (b_value == other.b_value);
192 double r()
const {
return r_value; }
194 double g()
const {
return g_value; }
196 double b()
const {
return b_value; }
236 HSL(
const double h,
const double s,
const double l);
269 return (h_value == other.h_value) && (s_value == other.s_value) &&
270 (l_value == other.l_value);
281 double h()
const {
return h_value; }
283 double s()
const {
return s_value; }
285 double l()
const {
return l_value; }
330 XYZ(
const double x,
const double y,
const double z);
344 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
358 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
367 return (x_value == other.x_value) && (y_value == other.y_value) &&
368 (z_value == other.z_value);
379 double x()
const {
return x_value; }
381 double y()
const {
return y_value; }
383 double z()
const {
return z_value; }
449 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
458 return (l_value == other.l_value) && (a_value == other.a_value) &&
459 (b_value == other.b_value);
470 double l()
const {
return l_value; }
472 double a()
const {
return a_value; }
474 double b()
const {
return b_value; }
511 Lab(
const double l,
const double a,
const double b);
531 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
546 return (l_value == other.l_value) && (a_value == other.a_value) &&
547 (b_value == other.b_value);
551 double l()
const {
return l_value; }
553 double a()
const {
return a_value; }
555 double b()
const {
return b_value; }
593 LCHab(
const double l,
const double c,
const double h);
618 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
627 return (l_value == other.l_value) && (c_value == other.c_value) &&
628 (h_value == other.h_value);
639 double l()
const {
return l_value; }
641 double c()
const {
return c_value; }
643 double h()
const {
return h_value; }
DIN99d color space representation.
DIN99d(const Lab &lab)
Construct DIN99d from Lab color.
DIN99d(const double l, const double a, const double b)
Construct DIN99d from component values.
bool operator!=(const DIN99d &other) const
inequality operator for DIN99d colors
DIN99d()
Default constructor initializes DIN99d to black (0,0,0)
DIN99d(const RGB &rgb)
Construct DIN99d from RGB color.
double b() const
Get blue-yellow component.
DIN99d(const HSL &hsl)
Construct DIN99d from HSL color.
double l() const
Get lightness component.
DIN99d(const XYZ &xyz, const std::array< double, 3 > &white_point={ 0.95047, 1, 1.08883 })
Construct DIN99d from XYZ color.
bool operator==(const DIN99d &other) const
equality operator for DIN99d colors
double a() const
Get green-red component.
HSL (Hue, Saturation, Lightness) color representation.
HSL(const Lab &lab)
Construct HSL from Lab color.
HSL(const double h, const double s, const double l)
Construct HSL from component values.
HSL(const XYZ &xyz)
Construct HSL from XYZ color.
bool operator!=(const HSL &other) const
Inequality operator for HSL colors.
HSL(const RGB &rgb)
Construct HSL from RGB color.
double l() const
Get lightness [0,1].
bool operator==(const HSL &other) const
Equality operator for HSL colors.
HSL()
Default constructor initializes HSL to black (0,0,0)
double s() const
Get saturation [0,1].
double h() const
Get hue in degrees [0,360)
HSL(const LCHab &lch)
Construct HSL from LCHab color.
LCHab color space representation (CIE L*C*h)
LCHab()
Default constructor initializes LCHab to black (0,0,0)
bool operator!=(const LCHab &other) const
inequality operator for LCHab colors
LCHab(const HSL &hsl)
Construct LCHab from HSL color.
double h() const
Get hue in degrees [0,360)
LCHab(const XYZ &xyz, const std::array< double, 3 > &white_point={ 0.95047, 1, 1.08883 })
Construct LCHab from XYZ color.
LCHab(const Lab &lab)
Construct LCHab from Lab color.
LCHab(const RGB &rgb)
Construct LCHab from RGB color.
double l() const
Get lightness [0,100].
double c() const
Get chroma [0,∞)
LCHab(const double l, const double c, const double h)
Construct LCHab from component values.
bool operator==(const LCHab &other) const
equality operator for LCHab colors
Lab color space representation (CIE L*a*b*).
Lab(const HSL &hsl)
Construct Lab from HSL color.
Lab(const RGB &rgb)
Construct Lab from RGB color.
double b() const
Get blue-yellow component.
bool operator==(const Lab &other) const
Equality operator for Lab colors.
Lab(const double l, const double a, const double b)
Construct Lab from component values.
double l() const
Get lightness [0,100].
double a() const
Get green-red component.
Lab()
Default constructor initializes Lab to black (0,0,0)
Lab(const LCHab &lch)
Construct Lab from LCHab color.
Lab(const XYZ &xyz, const std::array< double, 3 > &white_point={ 0.95047, 1, 1.08883 })
Construct Lab from XYZ color.
RGB color representation with values in [0,1] range.
RGB()
Default constructor initializes RGB to black (0,0,0)
RGB(const XYZ &xyz)
Construct RGB from XYZ color.
RGB(const std::array< double, 3 > rgb)
Construct RGB from array of normalized values.
RGB(const HSL &hsl)
Construct RGB from HSL color.
std::string hex() const
Convert RGB to hexadecimal string.
RGB(const double r, const double g, const double b)
Construct RGB from normalized values.
double g() const
Get green component [0,1].
bool operator!=(const RGB &other) const
Inequality operator for RGB colors.
RGB(const std::string &hex)
Construct RGB from hexadecimal color string.
double b() const
Get blue component [0,1].
RGB(const LCHab &lch)
Construct RGB from LCHab color.
double r() const
Get red component [0,1].
RGB(const Lab &lab)
Construct RGB from Lab color.
RGB(const char *hex)
Construct RGB from hexadecimal color string literal.
bool operator==(const RGB &other) const
Equality operator for RGB colors.
XYZ color representation (CIE 1931 color space).
bool operator==(const XYZ &other) const
equality operator for XYZ colors
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.
bool operator!=(const XYZ &other) const
inequality operator for XYZ colors
XYZ(const double x, const double y, const double z)
Construct XYZ from component values.
double z() const
Get Z component.
double x() const
Get X component.
XYZ()
Default constructor initializes XYZ to (0,0,0)
XYZ(const LCHab &lch, const std::array< double, 3 > &white_point={ 0.95047, 1, 1.08883 })
Construct XYZ from LCHab color.
XYZ(const RGB &rgb)
Construct XYZ from RGB color.
double y() const
Get Y component (luminance)
Qualitative color palette generation library.