RGB color stored in 24-bit RGB888 format.
More...
#include <RGB888.h>
|
| | RGB888 ()=default |
| | Creates a black RGB888 color.
|
| |
| | RGB888 (uint8_t r, uint8_t g, uint8_t b) |
| | Creates a color from 8-bit red, green, and blue components.
|
| |
| | RGB888 (uint8_t v) |
| | Creates a grayscale color from a single 8-bit value (all channels set to v).
|
| |
| void | setValue (uint8_t r, uint8_t g, uint8_t b) |
| | Sets the color from 8-bit red, green, and blue components.
|
| |
| uint8_t | getRed () const |
| | Returns the red component.
|
| |
| uint8_t | getGreen () const |
| | Returns the green component.
|
| |
| uint8_t | getBlue () const |
| | Returns the blue component.
|
| |
| const uint8_t * | getValue () const |
| | Returns the packed RGB888 value as a pointer to 3 bytes.
|
| |
|
| static uint8_t | size () |
| | Returns size in bits.
|
| |
|
| uint8_t | value [3] = {0, 0, 0} |
| |
RGB color stored in 24-bit RGB888 format.
The class provides conversion between 8-bit per channel RGB values and the packed 24-bit representation (3 bytes) commonly used in graphics.
◆ RGB888() [1/3]
◆ RGB888() [2/3]
| RGB888 |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
|
inline |
Creates a color from 8-bit red, green, and blue components.
◆ RGB888() [3/3]
Creates a grayscale color from a single 8-bit value (all channels set to v).
◆ getBlue()
| uint8_t getBlue |
( |
| ) |
const |
|
inline |
Returns the blue component.
◆ getGreen()
| uint8_t getGreen |
( |
| ) |
const |
|
inline |
Returns the green component.
◆ getRed()
Returns the red component.
◆ getValue()
| const uint8_t * getValue |
( |
| ) |
const |
|
inline |
Returns the packed RGB888 value as a pointer to 3 bytes.
◆ setValue()
| void setValue |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
|
inline |
Sets the color from 8-bit red, green, and blue components.
◆ size()
◆ value
| uint8_t value[3] = {0, 0, 0} |
|
protected |
The documentation for this class was generated from the following file: