![]() |
Pixel Dust Game Engine
v0.9.5
|
Public Member Functions | |
Color () | |
create a new black color object | |
Color (int r, int g, int b) | |
create a new color with the RGB values specified | |
Color (float r, float g, float b) | |
Color (int r, int g, int b, int a) | |
create a new color with the RGBA values specified | |
Color (float r, float g, float b, float a) | |
Color (uint32 c) | |
create a new color with the ARGB values specified in a single unsigned 32 bit value | |
Color & | operator= (const Color &c) |
set this color equal to another | |
Color & | operator= (uint32 c) |
set to ARGB color value | |
bool | operator== (const Color &c) |
check to see if this color is the same as another, IGNORES ALPHA | |
bool | operator== (uint32 c) |
void | convertToGrayscale () |
convert a color to a matching shade of grey | |
Static Public Member Functions | |
static Color | makeColor (float rf, float gf, float bf) |
create a color from floating point RGB, values are 0.0 to 1.0 | |
static Color | makeColor (float rf, float gf, float bf, float af) |
create a color from floating point RGBA, values are 0.0 to 1.0 | |
static Color | makeColor (const char *cssColorValue) |
create a color from a CSS color string value, eg: "#111", "#237D1A", "black", etc... | |
Public Attributes | |
float | red |
amount of red in the color, from 0.0 (none) to 1.0 (max red) | |
float | green |
amount of green in the color, from 0.0 (none) to 1.0 (max green) | |
float | blue |
amount of blue in the color, from 0.0 (none) to 1.0 (max blue) | |
float | alpha |
the alpha value for the color | |
A color in RGB color space, with optional alpha
|
inline |
create a new black color object
|
inline |
create a new color with the RGB values specified
|
inline |
|
inline |
create a new color with the RGBA values specified
|
inline |
|
inlineexplicit |
create a new color with the ARGB values specified in a single unsigned 32 bit value
|
inline |
convert a color to a matching shade of grey
|
inlinestatic |
create a color from floating point RGB, values are 0.0 to 1.0
|
inlinestatic |
create a color from floating point RGBA, values are 0.0 to 1.0
|
static |
create a color from a CSS color string value, eg: "#111", "#237D1A", "black", etc...
|
inline |
set to ARGB color value
|
inline |
check to see if this color is the same as another, IGNORES ALPHA
|
inline |
float alpha |
the alpha value for the color
float blue |
amount of blue in the color, from 0.0 (none) to 1.0 (max blue)
float green |
amount of green in the color, from 0.0 (none) to 1.0 (max green)
float red |
amount of red in the color, from 0.0 (none) to 1.0 (max red)