Minimal RGB color struct.
More...
#include <sensesp/system/crgb.h>
|
| constexpr | CRGB () noexcept |
| | Default constructor - initializes to black.
|
| constexpr | CRGB (uint8_t ir, uint8_t ig, uint8_t ib) noexcept |
| | RGB constructor.
|
| constexpr | CRGB (const CRGB &rhs) noexcept=default |
| | Copy constructor.
|
| CRGB & | operator= (const CRGB &rhs) noexcept=default |
| | Assignment operator.
|
| constexpr CRGB | operator- (const CRGB &rhs) const noexcept |
| | Binary subtraction operator with saturation.
|
|
| uint8_t | r |
| uint8_t | g |
| uint8_t | b |
Minimal RGB color struct.
This is a lightweight replacement for FastLED's CRGB struct, implementing only the features used by SensESP's LED blinker system.
Definition at line 58 of file crgb.h.
◆ CRGB() [1/3]
Default constructor - initializes to black.
Definition at line 64 of file crgb.h.
◆ CRGB() [2/3]
| sensesp::CRGB::CRGB |
( |
uint8_t | ir, |
|
|
uint8_t | ig, |
|
|
uint8_t | ib ) |
|
inlineconstexprnoexcept |
RGB constructor.
Definition at line 67 of file crgb.h.
◆ CRGB() [3/3]
| sensesp::CRGB::CRGB |
( |
const CRGB & | rhs | ) |
|
|
constexprdefaultnoexcept |
◆ operator-()
| CRGB sensesp::CRGB::operator- |
( |
const CRGB & | rhs | ) |
const |
|
inlineconstexprnoexcept |
Binary subtraction operator with saturation.
Subtracts each channel component-wise, saturating at 0. Used for color inversion: CRGB(255,255,255) - color
Definition at line 82 of file crgb.h.
◆ operator=()
| CRGB & sensesp::CRGB::operator= |
( |
const CRGB & | rhs | ) |
|
|
defaultnoexcept |
◆ Black
| CRGB sensesp::CRGB::Black {0, 0, 0} |
|
inlinestaticconstexpr |
◆ Blue
| CRGB sensesp::CRGB::Blue {0, 0, 255} |
|
inlinestaticconstexpr |
◆ Red
| CRGB sensesp::CRGB::Red {255, 0, 0} |
|
inlinestaticconstexpr |
◆ Yellow
| CRGB sensesp::CRGB::Yellow {255, 255, 0} |
|
inlinestaticconstexpr |
The documentation for this struct was generated from the following file: