#include <OpenGUI_Types.h>
Supports an alpha channel. The default color is White, with alpha = 1.0f
Public Member Functions | |
| Color (float R=1.0f, float G=1.0f, float B=1.0f, float A=1.0f) | |
| Constructor with optional in place initialization. | |
| void | clamp () |
| Clamps the color channels between 0.0f and 1.0f. | |
| void | normalize () |
| Normalizes the color channels by scaling the channel ranges to fall within 0.0f and 1.0f. | |
| bool | operator== (const Color &right) const |
| comparison operator | |
| bool | operator!= (const Color &right) const |
| comparison operator | |
Static Public Member Functions | |
| static Color | PresetRed () |
| Quickly generate a preset Color that is Red. | |
| static Color | PresetGreen () |
| Quickly generate a preset Color that is Green. | |
| static Color | PresetBlue () |
| Quickly generate a preset Color that is Blue. | |
| static Color | PresetWhite () |
| Quickly generate a preset Color that is White. | |
| static Color | PresetBlack () |
| Quickly generate a preset Color that is Black. | |
Public Attributes | |
| float | Red |
| Red Channel. | |
| float | Green |
| Green Channel. | |
| float | Blue |
| Blue Channel. | |
| float | Alpha |
| Alpha Channel. | |
|
||||||||||||||||||||
|
Constructor with optional in place initialization.
|
|
|
Clamps the color channels between 0.0f and 1.0f.
|
|
|
Normalizes the color channels by scaling the channel ranges to fall within 0.0f and 1.0f. If all channels have an equal value, the result will be the identity Color (all channels == 1.0f) |
|
|
comparison operator
|
|
|
comparison operator
|
|
|
Quickly generate a preset Color that is Black.
|
|
|
Quickly generate a preset Color that is Blue.
|
|
|
Quickly generate a preset Color that is Green.
|
|
|
Quickly generate a preset Color that is Red.
|
|
|
Quickly generate a preset Color that is White.
|
|
|
Alpha Channel.
|
|
|
Blue Channel.
|
|
|
Green Channel.
|
|
|
Red Channel.
|