Type encoding a RGBA-8888 color.
More...
#include <ui_Types.hpp>
|
| constexpr | Color () |
| | Creates a new Color with all values set to 0 (black color by default).
|
| |
| constexpr | Color (const u8 r, const u8 g, const u8 b, const u8 a) |
| | Creates a new Color with the specified values.
|
| |
| Color | WithAlpha (const u8 a) |
| | Creates a new Color with this Color's RGB values and the specified alpha value.
|
| |
|
| static Color | FromHex (const std::string &str_clr) |
| | Creates a new Color from a hexadecimal string ("#rrggbbaa" format).
|
| |
Type encoding a RGBA-8888 color.
◆ Color() [1/2]
Creates a new Color with all values set to 0 (black color by default).
◆ Color() [2/2]
| pu::ui::Color::Color |
( |
const u8 | r, |
|
|
const u8 | g, |
|
|
const u8 | b, |
|
|
const u8 | a ) |
|
inlineconstexpr |
Creates a new Color with the specified values.
- Parameters
-
| r | Red value. |
| g | Green value. |
| b | Blue value. |
| a | Alpha value. |
◆ FromHex()
| static Color pu::ui::Color::FromHex |
( |
const std::string & | str_clr | ) |
|
|
static |
Creates a new Color from a hexadecimal string ("#rrggbbaa" format).
- Parameters
-
| str_clr | Hexadecimal string to create the Color from. |
- Returns
- Created Color.
◆ WithAlpha()
| Color pu::ui::Color::WithAlpha |
( |
const u8 | a | ) |
|
|
inline |
Creates a new Color with this Color's RGB values and the specified alpha value.
- Parameters
-
- Returns
- Created Color.
The documentation for this struct was generated from the following file: