102 RGB(
const double r,
const double g,
const double b);
108 RGB(
const std::array<double, 3> rgb);
153 return (r_value == other.r_value) && (g_value == other.g_value) &&
154 (b_value == other.b_value);
176 double r()
const {
return r_value; }
178 double g()
const {
return g_value; }
180 double b()
const {
return b_value; }
213 HSL(
const double h,
const double s,
const double l);
246 return (h_value == other.h_value) && (s_value == other.s_value) &&
247 (l_value == other.l_value);
258 double h()
const {
return h_value; }
260 double s()
const {
return s_value; }
262 double l()
const {
return l_value; }
290 XYZ(
const double x,
const double y,
const double z);
304 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
318 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
327 return (x_value == other.x_value) && (y_value == other.y_value) &&
328 (z_value == other.z_value);
339 double x()
const {
return x_value; }
341 double y()
const {
return y_value; }
343 double z()
const {
return z_value; }
400 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
409 return (l_value == other.l_value) && (a_value == other.a_value) &&
410 (b_value == other.b_value);
421 double l()
const {
return l_value; }
423 double a()
const {
return a_value; }
425 double b()
const {
return b_value; }
457 Lab(
const double l,
const double a,
const double b);
477 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
492 return (l_value == other.l_value) && (a_value == other.a_value) &&
493 (b_value == other.b_value);
497 double l()
const {
return l_value; }
499 double a()
const {
return a_value; }
501 double b()
const {
return b_value; }
533 LCHab(
const double l,
const double c,
const double h);
558 const std::array<double, 3>& white_point = { 0.95047, 1, 1.08883 });
567 return (l_value == other.l_value) && (c_value == other.c_value) &&
568 (h_value == other.h_value);
579 double l()
const {
return l_value; }
581 double c()
const {
return c_value; }
583 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.
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.