|
RSTools 3.1.0
Versatile C++20 utility library
|
RGBA colors: hex and HSV conversions, blending, interpolation and named colors. More...
Classes | |
| struct | Color |
| 8-bit RGBA color, packed in 4 bytes. More... | |
| struct | Hsv |
| HSV color: hue in degrees [0, 360), saturation, value and alpha in [0, 1]. More... | |
Functions | |
| std::ostream & | operator<< (std::ostream &out, const Color &color) |
Prints the color as #RRGGBBAA. | |
| constexpr Color | lerp (const Color &a, const Color &b, float t) noexcept |
Interpolates every component, alpha included, with t clamped to [0, 1]. | |
| constexpr Color | blend (const Color &src, const Color &dst) noexcept |
Draws src over dst, taking the alpha of both into account. | |
Variables | |
Named colors | |
| constexpr Color | Black {0, 0, 0, 255} |
| constexpr Color | White {255, 255, 255, 255} |
| constexpr Color | Gray {128, 128, 128, 255} |
| constexpr Color | Red {255, 0, 0, 255} |
| constexpr Color | Green {0, 255, 0, 255} |
| constexpr Color | Blue {0, 0, 255, 255} |
| constexpr Color | Yellow {255, 255, 0, 255} |
| constexpr Color | Magenta {255, 0, 255, 255} |
| constexpr Color | Cyan {0, 255, 255, 255} |
| constexpr Color | Orange {255, 165, 0, 255} |
| constexpr Color | Purple {128, 0, 128, 255} |
| constexpr Color | Transparent {0, 0, 0, 0} |
RGBA colors: hex and HSV conversions, blending, interpolation and named colors.
| std::ostream & RST::Color::operator<< | ( | std::ostream & | out, |
| const Color & | color | ||
| ) |
Prints the color as #RRGGBBAA.
Interpolates every component, alpha included, with t clamped to [0, 1].
Draws src over dst, taking the alpha of both into account.
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |