HSL (Hue, Saturation, Lightness) color representation.
More...
#include <colors.h>
|
| HSL () |
| Default constructor initializes HSL to black (0,0,0)
|
|
| HSL (const double h, const double s, const double l) |
| Construct HSL from component values.
|
|
| HSL (const RGB &rgb) |
| Construct HSL from RGB color.
|
|
| HSL (const XYZ &xyz) |
| Construct HSL from XYZ color.
|
|
| HSL (const Lab &lab) |
| Construct HSL from Lab color.
|
|
| HSL (const LCHab &lch) |
| Construct HSL from LCHab color.
|
|
bool | operator== (const HSL &other) const |
| Equality operator for HSL colors.
|
|
bool | operator!= (const HSL &other) const |
| Inequality operator for HSL colors.
|
|
double | h () const |
| Get hue in degrees [0,360)
|
|
double | s () const |
| Get saturation [0,1].
|
|
double | l () const |
| Get lightness [0,1].
|
|
HSL (Hue, Saturation, Lightness) color representation.
HSL color space with hue in degrees [0,360), saturation and lightness in [0,1]. Provides intuitive color manipulation and conversion to/from RGB.
HSL orange(30, 1.0, 0.5);
HSL (Hue, Saturation, Lightness) color representation.
Definition at line 194 of file colors.h.
◆ HSL() [1/5]
qualpal::colors::HSL::HSL |
( |
const double |
h, |
|
|
const double |
s, |
|
|
const double |
l |
|
) |
| |
Construct HSL from component values.
- Parameters
-
h | Hue in degrees [0,360) |
s | Saturation [0,1] |
l | Lightness [0,1] |
◆ HSL() [2/5]
qualpal::colors::HSL::HSL |
( |
const RGB & |
rgb | ) |
|
Construct HSL from RGB color.
- Parameters
-
rgb | RGB color to convert from |
◆ HSL() [3/5]
qualpal::colors::HSL::HSL |
( |
const XYZ & |
xyz | ) |
|
Construct HSL from XYZ color.
- Parameters
-
xyz | XYZ color to convert from |
◆ HSL() [4/5]
qualpal::colors::HSL::HSL |
( |
const Lab & |
lab | ) |
|
Construct HSL from Lab color.
- Parameters
-
lab | Lab color to convert from |
◆ HSL() [5/5]
qualpal::colors::HSL::HSL |
( |
const LCHab & |
lch | ) |
|
Construct HSL from LCHab color.
- Parameters
-
lch | LCHab color to convert from |
◆ h()
double qualpal::colors::HSL::h |
( |
| ) |
const |
|
inline |
Get hue in degrees [0,360)
Definition at line 258 of file colors.h.
◆ l()
double qualpal::colors::HSL::l |
( |
| ) |
const |
|
inline |
Get lightness [0,1].
Definition at line 262 of file colors.h.
◆ operator!=()
bool qualpal::colors::HSL::operator!= |
( |
const HSL & |
other | ) |
const |
|
inline |
Inequality operator for HSL colors.
- Parameters
-
other | Other HSL color to compare with |
- Returns
- true if HSL colors are not equal, false otherwise
Definition at line 255 of file colors.h.
◆ operator==()
bool qualpal::colors::HSL::operator== |
( |
const HSL & |
other | ) |
const |
|
inline |
Equality operator for HSL colors.
- Parameters
-
other | Other HSL color to compare with |
- Returns
- true if both HSL colors are equal, false otherwise
Definition at line 244 of file colors.h.
◆ s()
double qualpal::colors::HSL::s |
( |
| ) |
const |
|
inline |
Get saturation [0,1].
Definition at line 260 of file colors.h.
The documentation for this class was generated from the following file: