A 16-bit RGB565 color, stored in panel byte order.
More...
|
| constexpr | rgb565 () noexcept=default |
| | Creates black.
|
| |
| constexpr | rgb565 (uint8_t r, uint8_t g, uint8_t b) noexcept |
| | Creates a color from 8-bit red, green, and blue components.
|
| |
| constexpr uint16_t | value () const noexcept |
| | Returns the packed RGB565 value.
|
| |
A 16-bit RGB565 color, stored in panel byte order.
The stored representation places the most significant byte first, the order color panels expect by default (rgb_data_endian::big), so arrays of rgb565 values can be passed directly to panel::draw_bitmap without conversion.
fb.set_pixel(10, 20, amber);
A 16-bit RGB565 color, stored in panel byte order.
Definition at line 55 of file color.hpp.
◆ rgb565() [1/2]
| constexpr idfxx::lcd::rgb565::rgb565 |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ rgb565() [2/2]
| constexpr idfxx::lcd::rgb565::rgb565 |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b |
|
) |
| |
|
inlineconstexprnoexcept |
Creates a color from 8-bit red, green, and blue components.
Components are truncated to the 5-6-5 bit layout: red and blue keep their top 5 bits, green its top 6.
- Parameters
-
| r | Red component, 0-255. |
| g | Green component, 0-255. |
| b | Blue component, 0-255. |
Definition at line 70 of file color.hpp.
◆ from_value()
| static constexpr rgb565 idfxx::lcd::rgb565::from_value |
( |
uint16_t |
value | ) |
|
|
inlinestaticconstexprnoexcept |
Creates a color from a packed RGB565 value.
- Parameters
-
| value | Packed color: red in bits 15-11, green in bits 10-5, blue in bits 4-0. |
- Returns
- The color.
Definition at line 80 of file color.hpp.
References value().
◆ value()
| constexpr uint16_t idfxx::lcd::rgb565::value |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the packed RGB565 value.
- Returns
- The packed color: red in bits 15-11, green in bits 10-5, blue in bits 4-0.
Definition at line 91 of file color.hpp.
Referenced by from_value().
◆ operator==
Compares two colors for equality.
The documentation for this class was generated from the following file: