|
ESPHome 2026.8.0
|
Which byte of an addressable LED's data carries each colour. More...
#include <channel_colors.h>
Public Member Functions | |
| bool | has_white () const |
| uint8_t | bytes_per_led () const |
| const char * | to_string (char *buf) const |
| Write the order back out as text, e.g. | |
Data Fields | |
| uint8_t | r |
| uint8_t | g |
| uint8_t | b |
| uint8_t | w |
Static Public Attributes | |
| static constexpr uint8_t | NO_WHITE = 0xFF |
Value of w for a strip that only has red, green and blue channels. | |
Which byte of an addressable LED's data carries each colour.
Built from a configuration string such as "GRB" or "WRGB": every field holds the position that colour occupies in the bytes the strip expects. w is NO_WHITE when the strip has no separate white channel.
Definition at line 12 of file channel_colors.h.
|
inline |
Definition at line 23 of file channel_colors.h.
|
inline |
Definition at line 21 of file channel_colors.h.
|
inline |
Write the order back out as text, e.g.
"GRBW".
buf must have room for at least 5 characters. Returns buf so the result can be passed straight to a log call.
Definition at line 29 of file channel_colors.h.
| uint8_t esphome::light::ChannelColors::b |
Definition at line 18 of file channel_colors.h.
| uint8_t esphome::light::ChannelColors::g |
Definition at line 17 of file channel_colors.h.
|
staticconstexpr |
Value of w for a strip that only has red, green and blue channels.
Definition at line 14 of file channel_colors.h.
| uint8_t esphome::light::ChannelColors::r |
Definition at line 16 of file channel_colors.h.
| uint8_t esphome::light::ChannelColors::w |
Definition at line 19 of file channel_colors.h.