|
| RGBA () |
| Default constructor does not perform initialization. More...
|
|
| RGBA (Byte lum, Byte a=255) |
| Constructs a grayscale color from the given luminance. More...
|
|
| RGBA (Byte r, Byte g, Byte b, Byte a=255) |
| Filling constructor. More...
|
|
| RGBA (const RGBA &)=default |
| Copy constructor. More...
|
|
| RGBA (const RGBA &first, const RGBA &second, double alpha) |
| Blending constructor. More...
|
|
| RGBA (const RGBA &first, const RGBA &second, float alpha=1.0f) |
| Blending constructor. More...
|
|
| RGBA (const RGBA &first, const RGBA &second, int alpha) |
| Blending constructor. More...
|
|
| RGBA (const RGBA &other, Byte newalpha) |
| Copy constructor with new alpha value. More...
|
|
| RGBA (const RGBA &other, double newalpha) |
| Copy constructor with new alpha value. More...
|
|
| RGBA (const RGBA &other, float newalpha) |
| Copy constructor with new alpha value. More...
|
|
| RGBA (const RGBA &other, int newalpha) |
| Copy constructor with new alpha value. More...
|
|
| RGBA (double lum) |
| Conversion from float. Assumes the given float value is a 0 to 1 luminance. Sets alpha to 255. More...
|
|
| RGBA (float lum) |
| Conversion from float. Assumes the given float value is a 0 to 1 luminance. Sets alpha to 255. More...
|
|
constexpr | RGBA (int color) |
| Conversion from integer. More...
|
|
| RGBA (int lum, int a) |
| Constructs a grayscale color from the given luminance. More...
|
|
constexpr | RGBA (uint32_t color) |
| Conversion from uint32_t. More...
|
|
float | AccurateLuminance () const |
| Returns the luminance of this color as a floating point value between 0 and 1. More...
|
|
void | Blend (const RGBA &color) |
| Blends the given color into this one. More...
|
|
void | Blend (const RGBA &color, float alpha) |
| Blends the given color into this one. More...
|
|
RGBA | BlendWith (const RGBA &color) const |
| Blends the current color with the given color and returns the result. More...
|
|
RGBA | BlendWith (const RGBA &color, float alpha) const |
| Blends the current color with the given color and returns the result. More...
|
|
std::string | HTMLColor () const |
| Returns a six nibble HTML color. More...
|
|
Byte | Luminance () const |
| Returns the luminance of this color as a single byte number. More...
|
|
| operator int () const |
| Conversion to integer. More...
|
|
| operator std::string () const |
| Converts this color to a hex representation of this color. More...
|
|
| operator uint32_t () const |
| Conversion to integer. More...
|
|
bool | operator!= (const RGBA &other) const |
| Compares two colors. More...
|
|
RGBA & | operator= (const int &color) |
| From integer assignment. More...
|
|
RGBA & | operator= (const RGBA &)=default |
| Copy assignment. More...
|
|
RGBA & | operator= (const uint32_t &color) |
| From integer assignment. More...
|
|
RGBA & | operator= (float lum) |
| From float assignment. Assumes the given float value is a 0 to 1 luminance. Sets alpha to 255. More...
|
|
bool | operator== (const RGBA &other) const |
| Compares two colors. More...
|
|
This class represents a color information.
Contains 4 channels, 8 bits each. Red is the lowest bit while alpha is the highest. Please note that conversion from/to integer will work in reverse of the HTML notation. 0xff800000 is dark blue not dark red.