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