26 static void rgb_to_hsb(
const rgb_t&
rgb, hsb_t&
hsb);
27 static void hsb_to_rgb(
const hsb_t&
hsb, rgb_t&
rgb);
33 uint8_t
red()
const {
return _rgb.r;}
37 uint8_t
green()
const {
return _rgb.g;}
41 uint8_t
blue()
const {
return _rgb.b;}
46 float hue()
const {
return _hsb.h;}
118 static color rgb(uint8_t r, uint8_t g, uint8_t b);
127 static color hsb(
float h,
float s,
float b);
136 bool operator==(
const color& c1,
const color& c2);
color & setHsb(float h, float s, float b)
Definition: color.cpp:143
color & setBlue(uint8_t b)
Definition: color.cpp:137
float brightness() const
Definition: color.h:54
uint8_t blue() const
Definition: color.h:41
uint8_t red() const
Definition: color.h:33
color & setBrightness(float b)
Definition: color.cpp:163
color & setHue(float h)
Definition: color.cpp:151
static color rgb(uint8_t r, uint8_t g, uint8_t b)
Definition: color.cpp:169
static color hsb(float h, float s, float b)
Definition: color.cpp:175
float saturation() const
Definition: color.h:50
color & setSaturation(float s)
Definition: color.cpp:157
color & setRed(uint8_t r)
Definition: color.cpp:125
float hue() const
Definition: color.h:46
color & setGreen(uint8_t g)
Definition: color.cpp:131
color & setRgb(uint8_t r, uint8_t g, uint8_t b)
Definition: color.cpp:117
uint8_t green() const
Definition: color.h:37
Definition: animation.cpp:3
bool operator==(const color &c1, const color &c2)
Definition: color.cpp:181