An RGB colour.
More...
#include <types.h>
|
int | r = 0 |
| red component, from 0 to 255
|
|
int | g = 0 |
| green component, from 0 to 255
|
|
int | b = 0 |
| blue component, from 0 to 255
|
|
An RGB colour.
Definition at line 300 of file types.h.
◆ Colour() [1/3]
Construct a Colour, initialising it to black
Definition at line 112 of file types.cc.
◆ Colour() [2/3]
Colour::Colour |
( |
int |
r_, |
|
|
int |
g_, |
|
|
int |
b_ |
|
) |
| |
Construct a Colour from R, G and B. The values run between 0 and 255.
Definition at line 118 of file types.cc.
◆ Colour() [3/3]
Colour::Colour |
( |
std::string |
argb_hex | ) |
|
|
explicit |
Construct a Colour from an ARGB hex string; the alpha value is ignored.
- Parameters
-
argb_hex | A string of the form AARRGGBB, where e.g. RR is a two-character hex value. |
Definition at line 127 of file types.cc.
◆ to_argb_string()
string Colour::to_argb_string |
( |
| ) |
const |
- Returns
- An ARGB string of the form AARRGGBB, where e.g. RR is a two-character hex value. The alpha value will always be FF (ie 255; maximum alpha).
Definition at line 137 of file types.cc.
◆ to_rgb_string()
string Colour::to_rgb_string |
( |
| ) |
const |
- Returns
- An RGB string of the form RRGGBB, where e.g. RR is a two-character hex value.
Definition at line 146 of file types.cc.
The documentation for this class was generated from the following files: