Convenience struct representing a colour.
More...
#include <mostlyharmless_Colour.h>
|
| Colour (std::uint32_t argb) |
|
| Colour (std::uint8_t r_, std::uint8_t g_, std::uint8_t b_) |
|
| Colour (std::uint8_t a_, std::uint8_t r_, std::uint8_t g_, std::uint8_t b_) |
|
|
std::uint8_t | a |
|
std::uint8_t | r |
|
std::uint8_t | g |
|
std::uint8_t | b |
|
Convenience struct representing a colour.
◆ Colour() [1/3]
mostly_harmless::gui::Colour::Colour |
( |
std::uint32_t | argb | ) |
|
|
explicit |
Constructs a colour from an ARGB hex colour, in the format 0xAARRGGBB
- for example, fully opaque red would be 0xFFFF0000
- Parameters
-
argb | The hex code for the desired colour. |
◆ Colour() [2/3]
mostly_harmless::gui::Colour::Colour |
( |
std::uint8_t | r_, |
|
|
std::uint8_t | g_, |
|
|
std::uint8_t | b_ ) |
Constructs a colour from individual (0 to 255) rgb args. In this overload, alpha defaults to 255.
- Parameters
-
r_ | The 0 to 255 value for red. |
g_ | The 0 to 255 value for green. |
b_ | The 0 to 255 value for blue. |
◆ Colour() [3/3]
mostly_harmless::gui::Colour::Colour |
( |
std::uint8_t | a_, |
|
|
std::uint8_t | r_, |
|
|
std::uint8_t | g_, |
|
|
std::uint8_t | b_ ) |
Constructs a colour from individual (0 to 255) argb args.
- Parameters
-
a_ | The 0 to 255 value for alpha (255 being fully opaque) |
r_ | The 0 to 255 value for red. |
g_ | The 0 to 255 value for green. |
b_ | The 0 to 255 value for blue. |
std::uint8_t mostly_harmless::gui::Colour::a |
std::uint8_t mostly_harmless::gui::Colour::b |
std::uint8_t mostly_harmless::gui::Colour::g |
std::uint8_t mostly_harmless::gui::Colour::r |
The documentation for this struct was generated from the following file: