|
enum class | Name {
Aliceblue
, Antiquewhite
, Aqua
, Aquamarine
, Azure
, Beige
, Bisque
, Black
, Blanchedalmond
, Blue
, Blueviolet
, Brown
, Burlywood
, Cadetblue
,
Chartreuse
, Chocolate
, Coral
, Cornflowerblue
, Cornsilk
, Crimson
, Cyan
, Darkblue
, Darkcyan
, Darkgoldenrod
, Darkgray
, Darkgreen
, Darkgrey
, Darkkhaki
,
Darkmagenta
, Darkolivegreen
, Darkorange
, Darkorchid
, Darkred
, Darksalmon
, Darkseagreen
, Darkslateblue
, Darkslategray
, Darkslategrey
, Darkturquoise
, Darkviolet
, Deeppink
, Deepskyblue
,
Dimgray
, Dimgrey
, Dodgerblue
, Firebrick
, Floralwhite
, Forestgreen
, Fuchsia
, Gainsboro
, Ghostwhite
, Gold
, Goldenrod
, Gray
, Green
, Greenyellow
,
Grey
, Honeydew
, Hotpink
, Indianred
, Indigo
, Ivory
, Khaki
, Lavender
, Lavenderblush
, Lawngreen
, Lemonchiffon
, Lightblue
, Lightcoral
, Lightcyan
,
Lightgoldenrodyellow
, Lightgray
, Lightgreen
, Lightgrey
, Lightpink
, Lightsalmon
, Lightseagreen
, Lightskyblue
, Lightslategray
, Lightslategrey
, Lightsteelblue
, Lightyellow
, Lime
, Limegreen
,
Linen
, Magenta
, Maroon
, Mediumaquamarine
, Mediumblue
, Mediumorchid
, Mediumpurple
, Mediumseagreen
, Mediumslateblue
, Mediumspringgreen
, Mediumturquoise
, Mediumvioletred
, Midnightblue
, Mintcream
,
Mistyrose
, Moccasin
, Navajowhite
, Navy
, Oldlace
, Olive
, Olivedrab
, Orange
, Orangered
, Orchid
, Palegoldenrod
, Palegreen
, Paleturquoise
, Palevioletred
,
Papayawhip
, Peachpuff
, Peru
, Pink
, Plum
, Powderblue
, Purple
, Red
, Rosybrown
, Royalblue
, Saddlebrown
, Salmon
, Sandybrown
, Seagreen
,
Seashell
, Sienna
, Silver
, Skyblue
, Slateblue
, Slategray
, Slategrey
, Snow
, Springgreen
, Steelblue
, Tan
, Teal
, Thistle
, Tomato
,
Turquoise
, Violet
, Wheat
, White
, Whitesmoke
, Yellow
, Yellowgreen
} |
| Named colors (same as SVG color keywords). More...
|
|
|
| Color () |
| Creates an opaque black color.
|
|
| Color (Color::Name name) |
| Creates a color from given color name name .
|
|
| Color (const char *str) |
| Crates a color from string str .
|
|
| Color (const string &str) |
| Crates a color from string str .
|
|
| Color (int r, int g, int b, int a=255) |
| Creates a color from given RGBA-values.
|
|
| Color (uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
| Creates a color from given RGBA-values.
|
|
uint8_t | alpha () const |
| Returns the alpha channel.
|
|
void | alpha (uint8_t a) |
| Sets the alpha channel to a .
|
|
uint8_t | blue () const |
| Returns the blue component.
|
|
void | blue (uint8_t b) |
| Sets the blue component to b .
|
|
bool | fromString (const string &str) |
| Sets this color to the color defined by str .
|
|
uint8_t | green () const |
| Returns the green component.
|
|
void | green (uint8_t g) |
| Sets the green component to g .
|
|
bool | operator!= (const Color &c) const |
| Returns true iff c and this color differ in any component.
|
|
bool | operator== (const Color &c) const |
| Returns true iff c and this color are equal in every component.
|
|
uint8_t | red () const |
| Returns the red component.
|
|
void | red (uint8_t r) |
| Sets the red component to r .
|
|
string | toString () const |
| Converts the color to a string and returns it.
|
|
Colors represented as RGBA values.
The Color class represents colors with four components: R (red), G (green), B (blue), and A (alpha channel). Each component has a value between and 255. The alpha channel controls tranparency, where an opaque color has an alpha channel of 255.
Definition at line 164 of file graphics.h.