26 Color() : red_(0.f), green_(0.f), blue_(0.f) {}
27 Color(
float r,
float g,
float b) : red_(
r), green_(
g), blue_(
b) {}
58 inline float Red()
const {
return red_; }
61 inline float Green()
const {
return green_; }
64 inline float Blue()
const {
return blue_; }
85 float r_ = red_ +
rhs.Red();
86 float g_ = green_ +
rhs.Green();
87 float b_ = blue_ +
rhs.Blue();
103 float ng =
a.Green() + (
b.Green() -
a.Green()) *
scalar;
104 float nb =
a.Blue() + (
b.Blue() -
a.Blue()) *
scalar;
112 static const float standard_colors[
LAST][3];
113 float red_, green_, blue_;
Color(float r, float g, float b)
Definition color.h:27
void SetBlue(const float amt)
Definition color.h:72
void Init(float red, float green, float blue)
Color()
Definition color.h:26
void SetGreen(const float amt)
Definition color.h:71
void SetRed(const float amt)
Definition color.h:70
float Green() const
Definition color.h:61
float Blue() const
Definition color.h:64
static Color Blend(const Color a, const Color b, const float amt)
Definition color.h:99
Color operator*(float scale)
Definition color.h:75
uint8_t Green8() const
Definition color.h:67
float Red() const
Definition color.h:58
uint8_t Blue8() const
Definition color.h:68
~Color()
Definition color.h:28
Color operator+(Color rhs)
Definition color.h:83
uint8_t Red8() const
Definition color.h:66
PresetColor
Definition color.h:32
@ GOLD
Definition color.h:39
@ GREEN
Definition color.h:34
@ LAST
Definition color.h:41
@ BLUE
Definition color.h:35
@ OFF
Definition color.h:40
@ WHITE
Definition color.h:36
@ RED
Definition color.h:33
@ CYAN
Definition color.h:38
@ PURPLE
Definition color.h:37
Definition leddriver.h:33
void Init(I2CHandle i2c, const uint8_t(&addresses)[numDrivers], DmaBuffer dma_buffer_a, DmaBuffer dma_buffer_b, Pin oe_pin=Pin(PORTX, 0))
Definition leddriver.h:65
Hardware defines and helpers for daisy field platform.
Definition index.h:2