Color in HSL space.
More...
#include <color.h>
|
| | Hsl (const double &, const double &, const double &) |
| | Create a color in HSL space.
|
| | Hsl (const Color &) |
| | Create a color in HSL space.
|
| void | Brighten (const double &) |
| | Brighten the color by changing its luminance, the hue and the saturation are unchanged.
|
|
Color | ToColor () const |
| | Convert a color in HSL space to RGB space.
|
|
| static double | ToRgb (double, double, double) |
| | Conversion function.
|
|
|
double | l = 0.0 |
| | Hue, saturation, luminance.
|
◆ Hsl() [1/2]
| Hsl::Hsl |
( |
const double & | h, |
|
|
const double & | s, |
|
|
const double & | l ) |
|
explicit |
Create a color in HSL space.
- Parameters
-
| h | Hue. |
| s | Saturation. |
| l | Lightness. |
◆ Hsl() [2/2]
| Hsl::Hsl |
( |
const Color & | c | ) |
|
|
explicit |
Create a color in HSL space.
- Parameters
-
◆ Brighten()
| void Hsl::Brighten |
( |
const double & | b | ) |
|
Brighten the color by changing its luminance, the hue and the saturation are unchanged.
Like Color::Brighten(), the luminance moves toward white (positive values) or toward black (negative values) by the given fraction of the remaining distance.
- Parameters
-
| b | Real in [-1,1], use -1 or +1 to converge to black and white respectively. |
◆ ToRgb()
| double Hsl::ToRgb |
( |
double | a, |
|
|
double | b, |
|
|
double | h ) |
|
staticprotected |
Conversion function.
- Parameters
-