A struct representing a color.
More...
#include <OficinaTypes.hpp>
|
| float | r |
| | Red component, ranged 0.0f ~ 1.0f. More...
|
| |
| float | g |
| | Green component, ranged 0.0f ~ 1.0f. More...
|
| |
| float | b |
| | Blue component, ranged 0.0f ~ 1.0f. More...
|
| |
| float | a |
| | Alpha component, ranged 0.0f ~ 1.0f. 1.0f is completely opaque. More...
|
| |
A struct representing a color.
◆ Color4() [1/4]
Constructs a black color.
◆ Color4() [2/4]
| Color4::Color4 |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b |
|
) |
| |
Constructs a custom opaque color.
- Parameters
-
| r | Red component to be given to the color, ranged 0.0f ~ 1.0f. |
| g | Green component to be given to the color, ranged 0.0f ~ 1.0f. |
| b | Blue component to be given to the color, ranged 0.0f ~ 1.0f. |
◆ Color4() [3/4]
| Color4::Color4 |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a |
|
) |
| |
Constructs a custom color.
- Parameters
-
| r | Red component to be given to the color, ranged 0.0f ~ 1.0f. |
| g | Green component to be given to the color, ranged 0.0f ~ 1.0f. |
| b | Blue component to be given to the color, ranged 0.0f ~ 1.0f. |
| a | Alpha component to be given to the color, ranged 0.0f ~ 1.0f. Bigger value means more opaque. |
◆ Color4() [4/4]
| Color4::Color4 |
( |
Color4 |
precolor, |
|
|
float |
a |
|
) |
| |
Constructs a color from another, changing only the alpha value.
- Parameters
-
| precolor | Color to be based on. |
| a | Alpha component to be given to the color, ranged 0.0f ~ 1.0f. |
◆ GetMask()
Gets the equivalent Color Mask of this color.
- Returns
- This color's equivalent color mask.
◆ MaskToColor4()
Transforms a mask into a Color4.
- Returns
- A Color4 containing the same components for the mask.
Alpha component, ranged 0.0f ~ 1.0f. 1.0f is completely opaque.
Blue component, ranged 0.0f ~ 1.0f.
Green component, ranged 0.0f ~ 1.0f.
Red component, ranged 0.0f ~ 1.0f.
The documentation for this struct was generated from the following file: