Structure to describe an RGB color.
More...
#include <color.hpp>
|
| Color () |
| Creates a color object with zero for the red, green, blue, and alpha channels. More...
|
|
| 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. More...
|
|
| Color (uint8_t r, uint8_t g, uint8_t b) |
| Creates a color from the given red, green, and blue values. More...
|
|
uint8_t | getAlpha () const |
|
uint8_t | getBlue () const |
| Returns the blue channel; value is between 0 and 255. More...
|
|
uint8_t | getGreen () const |
| Returns the green channel; value is between 0 and 255. More...
|
|
uint8_t | getRed () const |
| Returns the red channel; value is between 0 and 255. More...
|
|
void | setAlpha (uint8_t a) |
|
void | setBlue (uint8_t b) |
|
void | setGreen (uint8_t g) |
|
void | setRed (uint8_t r) |
|
|
uint8_t | a_ {} |
|
uint8_t | b_ {} |
|
uint8_t | g_ {} |
|
uint8_t | r_ {} |
|
Structure to describe an RGB color.
Definition at line 8 of file color.hpp.
Creates a color object with zero for the red, green, blue, and alpha channels.
Definition at line 12 of file color.hpp.
hebi::Color::Color |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b, |
|
|
uint8_t |
a |
|
) |
| |
|
inline |
Creates a color from the given red, green, blue, and alpha channel values.
Each parameter should be between 0 and 255.
Definition at line 19 of file color.hpp.
hebi::Color::Color |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
|
inline |
Creates a color from the given red, green, and blue values.
This sets the alpha channel to "255". Each parameter should be between 0 and 255.
Definition at line 26 of file color.hpp.
uint8_t hebi::Color::getAlpha |
( |
| ) |
const |
|
inline |
Returns the alpha channel; value is between 0 and 255. '0' indicates the module has control over this color, and any other value indicates that there is a command overriding this channel. For feedback/info values, this value should currently be ignored.
Definition at line 39 of file color.hpp.
uint8_t hebi::Color::getBlue |
( |
| ) |
const |
|
inline |
Returns the blue channel; value is between 0 and 255.
Definition at line 34 of file color.hpp.
uint8_t hebi::Color::getGreen |
( |
| ) |
const |
|
inline |
Returns the green channel; value is between 0 and 255.
Definition at line 32 of file color.hpp.
uint8_t hebi::Color::getRed |
( |
| ) |
const |
|
inline |
Returns the red channel; value is between 0 and 255.
Definition at line 30 of file color.hpp.
void hebi::Color::setAlpha |
( |
uint8_t |
a | ) |
|
|
inline |
void hebi::Color::setBlue |
( |
uint8_t |
b | ) |
|
|
inline |
void hebi::Color::setGreen |
( |
uint8_t |
g | ) |
|
|
inline |
void hebi::Color::setRed |
( |
uint8_t |
r | ) |
|
|
inline |
uint8_t hebi::Color::a_ {} |
|
private |
uint8_t hebi::Color::b_ {} |
|
private |
uint8_t hebi::Color::g_ {} |
|
private |
uint8_t hebi::Color::r_ {} |
|
private |
The documentation for this struct was generated from the following file: