Like RGB, but also has an alpha channel representing transparency.
More...
#include <rgba.hpp>
|
| constexpr | RGBA (uint8_t red=0, uint8_t green=0, uint8_t blue=0, uint8_t alpha=0) |
| | Construct an RGBA color.
|
| |
| constexpr | RGBA (RGB rgb, uint8_t alpha) |
| | Construct an RGBA color from an RGB color.
|
| |
| constexpr auto | operator== (const RGBA &rgba) const -> bool |
| | Compare 2 RGBAs.
|
| |
| constexpr | RGB (uint8_t red=0, uint8_t green=0, uint8_t blue=0) |
| | Construct an RGB color.
|
| |
| constexpr auto | operator== (const RGB &rgb) const -> bool |
| | Compare 2 RGBs.
|
| |
|
|
uint8_t | a |
| | Alpha channel.
|
| |
|
uint8_t | r |
| | Red primary color.
|
| |
|
uint8_t | g |
| | Green primary color.
|
| |
|
uint8_t | b |
| | Blue primary color.
|
| |
Like RGB, but also has an alpha channel representing transparency.
◆ RGBA() [1/2]
| KTech::RGBA::RGBA |
( |
uint8_t | red = 0, |
|
|
uint8_t | green = 0, |
|
|
uint8_t | blue = 0, |
|
|
uint8_t | alpha = 0 ) |
|
inlineconstexpr |
Construct an RGBA color.
- Parameters
-
| [in] | red | Red primary color. |
| [in] | green | Green primary color. |
| [in] | blue | Blue primary color. |
| [in] | alpha | Alpha channel. |
◆ RGBA() [2/2]
| KTech::RGBA::RGBA |
( |
RGB | rgb, |
|
|
uint8_t | alpha ) |
|
inlineconstexpr |
Construct an RGBA color from an RGB color.
- Parameters
-
| [in] | rgb | RGB base. |
| [in] | alpha | Alpha channel. |
◆ operator==()
| auto KTech::RGBA::operator== |
( |
const RGBA & | rgba | ) |
const -> bool
|
|
inlineconstexpr |
Compare 2 RGBAs.
- Parameters
-
| [in] | rgba | The RGBA to compare with this RGBA. |
- Returns
true: the alpha channel, red, green and blue primary colors are equal. false: they are unequal.
The documentation for this struct was generated from the following file: