Represents a color with four components: red, green, blue, alpha.
Each component is represented by a 32 bit float value. The value 0 for the alpha means full transparency, while 1 means fully opaque.
Definition at line 674 of file math.h.
|
| | Color (float fRed=1.0f, float fGreen=1.0f, float fBlue=1.0f, float fAlpha=1.0f) |
| | Constructs a color object with specified values. More...
|
| |
| void | Set (float fRed, float fGreen, float fBlue, float fAlpha=1.0f) |
| | Sets the current value of the color. More...
|
| |
| | operator const float * (void) const |
| | Returns a pointer to the color data, which consists of four floats (R, G, B, and A). More...
|
| |
| float & | operator[] (unsigned int iChannel) |
| | Returns a color component based on its index. More...
|
| |
| | operator unsigned int (void) const |
| | Converts the color value into a singe 32 bit integer, where each component takes eight bits. More...
|
| |
| Color & | operator*= (const float f) |
| | Multiplies each component of the color with a single scalar value. More...
|
| |
| Color | operator* (float f) const |
| | Multiplies the color by a scalar value. More...
|
| |
| Color | operator/ (float f) const |
| | Divides the color by a scalar value. More...
|
| |
| Color | operator* (const Color &c) const |
| | Multiplies two colors and returns the result. More...
|
| |
| Color & | operator*= (const Color &c) |
| | Mutliplies two colors, puts the result into the current object, and returns it. More...
|
| |
| Color | operator+ (const Color &c) const |
| | Adds two colors and returns the result. More...
|
| |
| Color | operator- (const Color &c) const |
| | Subtracts two colors and returns the result. More...
|
| |
| Color & | operator+= (const Color &c) |
| | Adds two colors, puts the result into the current object, and returns it. More...
|
| |
| bool | operator== (const Color &c) const |
| | Returns true if the two colors are identical, false otherwise. More...
|
| |
| bool | operator!= (const Color &c) const |
| | Returns true if the two colors are different, false otherwise. More...
|
| |
| Color | Mix (const Color &c, float f) const |
| | Mix two colors based on a scalar value which should be within the range 0 and 1. More...
|
| |
| float | Luminance () const |
| | Returns the luminance value for the color. More...
|
| |
| void | toHSV (float &hue, float &sat, float &val) const |
| |
| void | fromHSV (float hue, float sat, float val) |
| |
| void | toCMYK (float &c, float &m, float &y, float &k) const |
| |
| void | fromCMYK (float c, float m, float y, float k) |
| |