54 LeColor(uint8_t
const& _r, uint8_t
const& _g, uint8_t
const& _b, uint8_t
const& _a):
a(_a),
r(_r),
g(_g),
b(_b) {}
55 explicit LeColor(
int const& color):
a(color >> 24),
r(color >> 16),
g(color >> 8),
b(color) {};
65 return (
a << 24) | (
r << 16) | (
g << 8) |
b;
70 return LeColor(rgba >> 16, rgba >> 8, rgba >> 0, rgba >> 24);
74 return LeColor(rgb >> 16, rgb >> 8, rgb, 1);
85 LeColor(uint8_t
const& _r, uint8_t
const& _g, uint8_t
const& _b, uint8_t
const& _a): b(_b), g(_g), r(_r), a(_a) {}
86 explicit LeColor(
int const& color): b(color), g(color >> 8), r(color >> 16), a(color >> 24) {};
96 return (r << 16) | (g << 8) | b | (a << 24);
101 return LeColor(rgba >> 16, rgba >> 8, rgba, rgba >> 24);
105 return LeColor(rgb >> 16, rgb >> 8, rgb, 1);
LeColor()
Definition: color.h:84
uint8_t b
Definition: color.h:109
LeColor & operator=(LeColor const &color)
Definition: color.h:44
LeColor(uint8_t const &_r, uint8_t const &_g, uint8_t const &_b, uint8_t const &_a)
Definition: color.h:85
uint8_t g
Definition: color.h:110
Represent an RGBA color.
Definition: color.h:42
static LeColor rgba(uint32_t const &rgba)
Definition: color.h:100
LeColor(int const &color)
Definition: color.h:86
uint8_t r
Definition: color.h:111
static LeColor rgb(uint32_t const &rgb)
Definition: color.h:104
LeColor & operator=(int const &color)
Definition: color.h:87
uint8_t a
Definition: color.h:112