RGB color stored in 16-bit RGB565 format.
More...
#include <RGB565.h>
|
| | RGB565 ()=default |
| | Creates a black RGB565 color.
|
| |
| | RGB565 (uint8_t r, uint8_t g, uint8_t b) |
| | Creates a color from 8-bit red, green, and blue components.
|
| |
| | RGB565 (uint16_t packed) |
| | Creates a color from a packed RGB565 value.
|
| |
| void | setValue (uint8_t r, uint8_t g, uint8_t b) |
| | Sets the color from 8-bit red, green, and blue components.
|
| |
| void | setValue (uint16_t packed) |
| | Sets the color from a packed RGB565 value.
|
| |
| uint8_t | getRed () const |
| | Returns the red component expanded to 8 bits.
|
| |
| uint8_t | getGreen () const |
| | Returns the green component expanded to 8 bits.
|
| |
| uint8_t | getBlue () const |
| | Returns the blue component expanded to 8 bits.
|
| |
| uint16_t | getValue () const |
| | Returns the packed RGB565 value.
|
| |
|
| static uint8_t | size () |
| | Returns size in bits.
|
| |
RGB color stored in 16-bit RGB565 format.
The class provides conversion between 8-bit per channel RGB values and the packed 16-bit representation commonly used by embedded displays.
◆ RGB565() [1/3]
◆ RGB565() [2/3]
| RGB565 |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
|
inline |
Creates a color from 8-bit red, green, and blue components.
◆ RGB565() [3/3]
Creates a color from a packed RGB565 value.
◆ getBlue()
| uint8_t getBlue |
( |
| ) |
const |
|
inline |
Returns the blue component expanded to 8 bits.
◆ getGreen()
| uint8_t getGreen |
( |
| ) |
const |
|
inline |
Returns the green component expanded to 8 bits.
◆ getRed()
Returns the red component expanded to 8 bits.
◆ getValue()
| uint16_t getValue |
( |
| ) |
const |
|
inline |
Returns the packed RGB565 value.
◆ setValue() [1/2]
| void setValue |
( |
uint16_t |
packed | ) |
|
|
inline |
Sets the color from a packed RGB565 value.
◆ setValue() [2/2]
| 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
The documentation for this class was generated from the following file: