19 Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
20 : r_(r), g_(g), b_(b), a_(a) {}
26 Color(uint8_t r, uint8_t g, uint8_t b)
27 : r_(r), g_(g), b_(b), a_(255) {}
30 uint8_t
getRed()
const {
return r_; }
uint8_t getRed() const
Returns the red channel; value is between 0 and 255.
Definition: color.hpp:30
uint8_t getAlpha() const
Definition: color.hpp:39
void setBlue(uint8_t b)
Definition: color.hpp:43
void setGreen(uint8_t g)
Definition: color.hpp:42
void setAlpha(uint8_t a)
Definition: color.hpp:44
void setRed(uint8_t r)
Definition: color.hpp:41
uint8_t getBlue() const
Returns the blue channel; value is between 0 and 255.
Definition: color.hpp:34
Color()
Creates a color object with zero for the red, green, blue, and alpha channels.
Definition: color.hpp:12
uint8_t getGreen() const
Returns the green channel; value is between 0 and 255.
Definition: color.hpp:32
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Creates a color from the given red, green, blue, and alpha channel values.
Definition: color.hpp:19
Structure to describe an RGB color.
Definition: color.hpp:8
Color(uint8_t r, uint8_t g, uint8_t b)
Creates a color from the given red, green, and blue values.
Definition: color.hpp:26