23#define KTECH_DEFINITION
24#include "../ktech.hpp"
25#undef KTECH_DEFINITION
40 constexpr RGBA(uint8_t red = 0, uint8_t green = 0, uint8_t blue = 0, uint8_t alpha = 0)
41 :
RGB(red, green, blue),
a(alpha) {}
49 :
RGB(rgb),
a(alpha) {}
58 return (
r == rgba.r) && (
g == rgba.g) && (
b == rgba.b) && (
a == rgba.a);
Like RGB, but also has an alpha channel representing transparency.
Definition rgba.hpp:30
uint8_t a
Alpha channel.
Definition rgba.hpp:31
constexpr RGBA(RGB rgb, uint8_t alpha)
Construct an RGBA color from an RGB color.
Definition rgba.hpp:48
constexpr RGBA(uint8_t red=0, uint8_t green=0, uint8_t blue=0, uint8_t alpha=0)
Construct an RGBA color.
Definition rgba.hpp:40
constexpr auto operator==(const RGBA &rgba) const -> bool
Compare 2 RGBAs.
Definition rgba.hpp:56
24-bit color, able of representing 16,777,216 (2^24) different colors.
Definition rgb.hpp:29
uint8_t g
Green primary color.
Definition rgb.hpp:31
uint8_t r
Red primary color.
Definition rgb.hpp:30
uint8_t b
Blue primary color.
Definition rgb.hpp:32