18 #ifndef ZENI_COLOR_HXX
19 #define ZENI_COLOR_HXX
28 return static_cast<unsigned char>(
r*0xFF);
32 return static_cast<unsigned char>(
g*0xFF);
36 return static_cast<unsigned char>(
b*0xFF);
40 return static_cast<unsigned char>(
a*0xFF);
56 assert(-1 < index && index < 4);
57 const float *
const ptr = &
r;
62 assert(-1 < index && index < 4);
63 float *
const ptr = &
r;
unsigned char a_ub() const
Get the alpha channel [0x00, 0xFF].
GLboolean GLboolean GLboolean GLboolean a
Uint32 get_rgba() const
Get a Uint32 representation of 0xRRGGBBAA.
const float & operator[](const int &index) const
Get 'index'.
unsigned char r_ub() const
Get the red channel [0x00, 0xFF].
uint32_t Uint32
An unsigned 32-bit integer type.
unsigned char b_ub() const
Get the blue channel [0x00, 0xFF].
unsigned char g_ub() const
Get the green channel [0x00, 0xFF].
Uint32 get_bgra() const
Get a Uint32 representation of 0xBBGGRRAA - Endianness swap of rgba.
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble b
Uint32 get_argb() const
Get a Uint32 representation of 0xAARRGGBB.