#include <RgbColor.h>
Public Types | |
typedef NeoRgbCurrentSettings | SettingsObject |
Public Member Functions | |
RgbColor (uint8_t r, uint8_t g, uint8_t b) | |
RgbColor (uint8_t brightness) | |
RgbColor (const RgbwColor &color) | |
RgbColor (const Rgb16Color &color) | |
RgbColor (const HtmlColor &color) | |
RgbColor (const HslColor &color) | |
RgbColor (const HsbColor &color) | |
RgbColor () | |
bool | operator== (const RgbColor &other) const |
bool | operator!= (const RgbColor &other) const |
int16_t | CompareTo (const RgbColor &other, uint8_t epsilon=1) |
uint8_t | operator[] (size_t idx) const |
uint8_t & | operator[] (size_t idx) |
uint8_t | CalculateBrightness () const |
RgbColor | Dim (uint8_t ratio) const |
RgbColor | Brighten (uint8_t ratio) const |
void | Darken (uint8_t delta) |
void | Lighten (uint8_t delta) |
uint32_t | CalcTotalTenthMilliAmpere (const SettingsObject &settings) |
Static Public Member Functions | |
static int16_t | Compare (const RgbColor &left, const RgbColor &right, uint8_t epsilon=1) |
static RgbColor | LinearBlend (const RgbColor &left, const RgbColor &right, float progress) |
static RgbColor | LinearBlend (const RgbColor &left, const RgbColor &right, uint8_t progress) |
static RgbColor | BilinearBlend (const RgbColor &c00, const RgbColor &c01, const RgbColor &c10, const RgbColor &c11, float x, float y) |
Public Attributes | |
uint8_t | R |
uint8_t | G |
uint8_t | B |
Static Public Attributes | |
static const uint8_t | Max = 255 |
static const size_t | Count = 3 |
Additional Inherited Members | |
![]() | |
static float | _CalcColor (float p, float q, float t) |
static void | _HslToRgb (const HslColor &color, float *r, float *g, float *b) |
static void | _HsbToRgb (const HsbColor &color, float *r, float *g, float *b) |
template<typename T_COLOR , typename T_RESULT > | |
static T_RESULT | _Compare (const T_COLOR &left, const T_COLOR &right, T_RESULT epsilon) |
|
inline |
|
inline |
|
explicit |
RgbColor::RgbColor | ( | const Rgb16Color & | color | ) |
RgbColor::RgbColor | ( | const HtmlColor & | color | ) |
RgbColor::RgbColor | ( | const HslColor & | color | ) |
RgbColor::RgbColor | ( | const HsbColor & | color | ) |
|
inline |
|
static |
RgbColor RgbColor::Brighten | ( | uint8_t | ratio | ) | const |
|
inline |
uint8_t RgbColor::CalculateBrightness | ( | ) | const |
|
inlinestatic |
|
inline |
void RgbColor::Darken | ( | uint8_t | delta | ) |
RgbColor RgbColor::Dim | ( | uint8_t | ratio | ) | const |
void RgbColor::Lighten | ( | uint8_t | delta | ) |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
uint8_t RgbColor::B |
|
static |
uint8_t RgbColor::G |
|
static |
uint8_t RgbColor::R |