Public Member Functions |
| | Color (float r, float g, float b, float a=1.f) |
| | Color (float gray=1.f, float a=1.f) |
|
float & | operator[] (int i) |
| | Set color component at index with no bounds checking.
|
|
const float & | operator[] (int i) const |
| | Get color component at index with no bounds checking.
|
|
Color & | operator= (const HSV &hsv) |
| | Set color from HSV values.
|
|
Color & | operator*= (float v) |
| | Multiply RGBA values by argument.
|
|
Color | operator* (float v) const |
| | Multiplies RGBA components by argument.
|
|
Color | operator+ (const Color &c) const |
| | Adds argument RGBA components.
|
|
Color | operator- (const Color &c) const |
| | Subtracts argument RGBA components.
|
|
Color | blackAndWhite () const |
| | Returns nearest black or white color.
|
|
Color | inverse () const |
| | Returns inverted color.
|
|
float | luminance () const |
| | Get luminance value.
|
|
Color | mix (const Color &c, float amt) |
| | Returns linear mix with another color (0 = none).
|
|
void | clamp () |
| | Clamp RGB components into [0,1].
|
|
void | invert () |
| | Invert colors.
|
|
void | scale (float amount) |
| | Scale RGB components.
|
|
void | set (float r, float g, float b, float a) |
| | Set RGBA components.
|
|
void | set (float r, float g, float b) |
| | Set RGB components.
|
|
void | set (const Color &other, float rgbScale=1) |
| | Copy another Color's colors.
|
|
void | set (float gray) |
| | Set as gray color.
|
|
void | set (float gray, float alpha) |
| | Set as gray color with alpha.
|
|
void | setHSV (float h, float s, float v) |
| | Set color from HSV values in [0, 1].
|
|
void | getHSV (float &h, float &s, float &v) const |
| | Get HSV values in [0, 1] from color.
|
|
void | setHSV6 (float h, float s, float v) |
| | Set color from H value in [0, 6] and SV values in [0, 1].
|
|
void | getHSV6 (float &h, float &s, float &v) const |
| | Get H value in [0, 6] and SV values in [0, 1] from color.
|