Colour class with red, green, blue and alpha in range 0 to 255.
More...
#include <Colors.hpp>
|
| RGBA ()=default |
| default constructor
|
|
| RGBA (int r, int g, int b, int a=default_alpha) noexcept |
| constructor taking red, green, blue and alpha
|
|
| RGBA (const Vector< float, 4 > &v) noexcept |
| constructor taking 4 float vector
|
|
| RGBA (const Vector< float, 3 > &v) noexcept |
| constructor taking 3 float vector
|
|
| operator Vector< float, 4 > () const noexcept |
| convert to an float vector
|
|
std::string | to_rgb_string () const noexcept |
| convert to an rgb string of form #rrggbb
|
|
int | r () const noexcept |
| Get the current red value.
|
|
int | g () const noexcept |
| Get the current green value.
|
|
int | b () const noexcept |
| Get the current blue value.
|
|
int | a () const noexcept |
| Get the current alpha value.
|
|
RGBA & | r (int r) noexcept |
| Set a new red value.
|
|
RGBA & | g (int g) noexcept |
| Set a new green value.
|
|
RGBA & | b (int b) noexcept |
| Set a new blue value.
|
|
RGBA & | a (int a) noexcept |
| Set a new alpha value.
|
|
bool | operator== (const RGBA &b) const noexcept |
| Equality comparison.
|
|
bool | operator!= (const RGBA &b) const noexcept |
|
|
static const int | default_alpha = 200 |
|
static const std::array< const RGBA, 10 > | defaults |
|
static const RGBA | black {0, 0, 0} |
|
static const RGBA | white {255, 255, 255} |
|
Colour class with red, green, blue and alpha in range 0 to 255.
◆ defaults
const std::array< const RGBA, 10 > trase::RGBA::defaults |
|
static |
Initial value:= {
RGBA{227, 119, 194},
RGBA{127, 127, 127},
RGBA{188, 189, 34},
The documentation for this class was generated from the following files: