Represents an HSLA color.
More...
#include "donner/css/Color.h"
|
| constexpr | HSLA (float hDeg, float s, float l, uint8_t a) |
| | Constructor, initializes to the given HSLA values.
|
|
RGBA | toRGBA () const |
| | Convert the color to an RGBA color.
|
|
bool | operator== (const HSLA &) const =default |
| | Equality operator.
|
|
| static constexpr HSLA | HSL (float hDeg, float s, float l) |
| | Constructor, for HSL colors, which are fully opaque.
|
|
|
float | hDeg |
| | Hue component, in degrees [0, 360].
|
|
float | s |
| | Saturation component, as a percentage [0, 1].
|
|
float | l |
| | Lightness component, as a percentage [0, 1].
|
|
uint8_t | a = 0xFF |
| | Alpha component, as uint8 [0, 255].
|
|
| std::ostream & | operator<< (std::ostream &os, const HSLA &color) |
| | Ostream output operator.
|
Represents an HSLA color.
◆ HSLA()
| donner::css::HSLA::HSLA |
( |
float | hDeg, |
|
|
float | s, |
|
|
float | l, |
|
|
uint8_t | a ) |
|
inlineconstexpr |
Constructor, initializes to the given HSLA values.
- Parameters
-
| hDeg | The hue component, in degrees [0, 360]. |
| s | The saturation component, as a percentage [0, 1]. |
| l | The lightness component, as a percentage [0, 1]. |
| a | The alpha component, as a uint8 [0, 255]. |
◆ HSL()
| constexpr HSLA donner::css::HSLA::HSL |
( |
float | hDeg, |
|
|
float | s, |
|
|
float | l ) |
|
inlinestaticconstexpr |
Constructor, for HSL colors, which are fully opaque.
- Parameters
-
| hDeg | The hue component, in degrees [0, 360]. |
| s | The saturation component, as a percentage [0, 1]. |
| l | The lightness component, as a percentage [0, 1]. |
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
const HSLA & | color ) |
|
friend |
Ostream output operator.
Outputs: hsla(h, s, l, a).
- Parameters
-
| os | The output stream. |
| color | The color to output. |
The documentation for this struct was generated from the following files:
- donner/css/Color.h
- donner/css/Color.cc