Structure representing a 32 bit RGBA color. More...
RGB Colors | |
uint8 | red |
Red value for the color. | |
uint8 | green |
Green value for the color. | |
uint8 | blue |
Blue value for the color. | |
uint8 | alpha |
Alpha value for the color. | |
rgb_color & | set_to (uint8 r, uint8 g, uint8 b, uint8 a=255) |
Helper method to set all values of the color. | |
int32 | Brightness () const |
Calculates a value representing the brightness of this color. | |
bool | operator== (const rgb_color &other) const |
Comparison operator. | |
bool | operator!= (const rgb_color &other) const |
Comparison operator. | |
rgb_color & | operator= (const rgb_color &other) |
Assign values from another color object. | |
Structure representing a 32 bit RGBA color.
int32 rgb_color::Brightness | ( | ) | const |
Calculates a value representing the brightness of this color.
This method uses a fast algorithm to calculate the brightness in Luma of the color.
|
inline |
Comparison operator.
other | The other color to compare to. |
true | The colors are different. |
false | The colors match. |
|
inline |
Comparison operator.
other | The other color to compare to. |
true | The colors match. |
false | The colors are different. |
Helper method to set all values of the color.
r | Red value. |
g | Green value. |
b | Blue value. |
a | Alpha value. |
References alpha, blue, green, and red.
Referenced by operator=().
uint8 rgb_color::alpha |
Alpha value for the color.
Referenced by BScreen::IndexForColor(), operator=(), set_to(), BView::SetHighColor(), BView::SetLowColor(), and BView::SetViewColor().
uint8 rgb_color::blue |
Blue value for the color.
Referenced by BScreen::IndexForColor(), operator=(), set_to(), BView::SetHighColor(), BView::SetLowColor(), BColorControl::SetValue(), and BView::SetViewColor().
uint8 rgb_color::green |
Green value for the color.
Referenced by BScreen::IndexForColor(), operator=(), set_to(), BView::SetHighColor(), BView::SetLowColor(), BColorControl::SetValue(), and BView::SetViewColor().
uint8 rgb_color::red |
Red value for the color.
Referenced by BScreen::IndexForColor(), operator=(), set_to(), BView::SetHighColor(), BView::SetLowColor(), BColorControl::SetValue(), and BView::SetViewColor().