#include <color.h>
RGBA color.
Public Member Functions | |
Color () | |
opaque black More... | |
Color (KyUInt32 rgba) | |
w parameters in [0, 255] a=0 is fully transparent, a=255 is opaque More... | |
bool | IsVisible () const |
alpha != 0 More... | |
bool | IsOpaque () const |
alpha == 255 More... | |
bool | IsTransparent () const |
alpha != 255 More... | |
void | SetFloat (KyFloat32 r_, KyFloat32 g_, KyFloat32 b_, KyFloat32 a_=1.0f) |
parameters in [0.0f, 1.0f], a=0.0f is fully transparent, a=1.0f is fully opaque More... | |
Static Public Member Functions | |
static Color | GetDistinctColor (KyUInt32 index) |
Retrieves the color with the specified index within a limited internal palette of 31 distinct colors. More... | |
static Color | GetDistinctColor (const KyUInt32 index, const Color *customPalette, KyUInt32 nbColorsInPalette) |
Retrieves the color with the specified index from the specified palette. More... | |
Public Attributes | |
KyUInt8 | r |
red More... | |
KyUInt8 | g |
green More... | |
KyUInt8 | b |
blue More... | |
KyUInt8 | a |
alpha More... | |
|
inline |
opaque black
|
inline |
w parameters in [0, 255] a=0 is fully transparent, a=255 is opaque
Retrieves the color with the specified index within a limited internal palette of 31 distinct colors.
|
static |
Retrieves the color with the specified index from the specified palette.
index | The index of the color to retrieve. |
customPalette | An array of colors from which the specified index will be retrieved. |
nbColorsInPalette | The number of elements in thecustomPalette array. |
|
inline |
alpha == 255
|
inline |
alpha != 255
|
inline |
alpha != 0
parameters in [0.0f, 1.0f], a=0.0f is fully transparent, a=1.0f is fully opaque
KyUInt8 Kaim::Color::a |
alpha
KyUInt8 Kaim::Color::b |
blue
KyUInt8 Kaim::Color::g |
green
KyUInt8 Kaim::Color::r |
red