nn::util::Color8 Structurestruct Color8
{
u8 r;
u8 g;
u8 b;
u8 a;
};
Structure representing integer colors.
| S |
ELEMENT_MIN
|
The minimum value of the color component. |
|---|---|---|
| S |
ELEMENT_MAX
|
The maximum value of the color component. |
| S |
ALPHA_MIN
|
The minimum alpha value. |
| S |
ALPHA_MAX
|
The maximum alpha value. |
| S |
ALPHA_OPACITY
|
The alpha value for opacity. |
| S |
ALPHA_TRANSPARENT
|
The alpha value for transparency. |
| S |
BLACK
|
A constant for the color black. |
| S |
GRAY
|
A constant for the color gray. |
| S |
WHITE
|
A constant for the color white. |
| S |
RED
|
A constant for the color red. |
| S |
GREEN
|
A constant for the color green. |
| S |
BLUE
|
A constant for the color blue. |
| S |
YELLOW
|
A constant for the color yellow. |
| S |
MAGENTA
|
A constant for the color magenta. |
| S |
CYAN
|
A constant for the color cyan. |
| r | The R color component. Holds a value between 0 and 255. | |
|---|---|---|
| g | The G color component. Holds a value between 0 and 255. | |
| b | The B color component. Holds a value between 0 and 255. | |
| a | The A color component. Holds a value between 0 and 255. |
| Constructors and Destructors | ||
|---|---|---|
Color8
|
This is the default constructor. | |
~Color8
|
Destructor. | |
| Overloaded Operators | ||
operator=
|
An assignment operator for u32 values. |
|
operator u32
|
An operator for casting to a u32 value. |
|
operator+
|
An addition operator for two colors. | |
operator-
|
A subtraction operator for two colors. | |
operator *
|
A multiplication operator for two colors. | |
operator/
|
A division operator for two colors. | |
operator++
|
The prefix increment operator. | |
operator--
|
The prefix decrement operator. | |
operator|
|
Finds the bitwise OR as a u32 value. |
|
| operator& | Finds the bitwise AND as a u32 value. |
|
operator+=
|
A compound assignment operator for adding two colors. | |
operator-=
|
A compound assignment operator for subtracting two colors. | |
operator*=
|
A compound assignment operator for multiplying two colors. | |
operator/=
|
A compound assignment operator for dividing two colors. | |
| Set/Get | ||
Set
|
Sets an RGBA value. | |
ToU32
|
Gets a color as a u32 value. |
|
SetU32
|
Sets a u32 value. |
|
CONFIDENTIAL