Urho3D
|
RGBA color. More...
#include <Color.h>
Public Member Functions | |
Color () | |
Construct with default values (opaque white.) | |
Color (const Color &color) | |
Copy-construct from another color. | |
Color (const Color &color, float a) | |
Construct from another color and modify the alpha. | |
Color (float r, float g, float b) | |
Construct from RGB values and set alpha fully opaque. | |
Color (float r, float g, float b, float a) | |
Construct from RGBA values. | |
bool | operator== (const Color &rhs) const |
Test for equality with another color. | |
bool | operator!= (const Color &rhs) const |
Test for inequality with another color. | |
Color | operator* (float rhs) const |
Multiply with a scalar. | |
Color | operator+ (const Color &rhs) const |
Add a color. | |
Color & | operator+= (const Color &rhs) |
Add-assign a color. | |
const float * | Data () const |
Return float data. | |
Vector3 | RGBValues () const |
Return RGB values as a Vector3. | |
float | Intensity () const |
Return approximate intensity. | |
Color | Lerp (const Color &rhs, float t) const |
Linear interpolation with another color. | |
unsigned | ToUInt () const |
Return color packed to a 32-bit integer. Components are clamped to [0, 1] range. | |
Vector4 | ToVector4 () const |
Return as a four-dimensional vector. | |
String | ToString () const |
Return as string. |
Public Attributes | |
float | r_ |
Red value. | |
float | g_ |
Green value. | |
float | b_ |
Blue value. | |
float | a_ |
Alpha value. |
Static Public Attributes | |
static const Color | WHITE |
Opaque white color. | |
static const Color | YELLOW |
Opaque yellow color. | |
static const Color | RED |
Opaque red color. | |
static const Color | GREEN |
Opaque green color. | |
static const Color | BLUE |
Opaque green color. | |
static const Color | BLACK |
Opaque black color. |
RGBA color.