FastLED 3.6.0
|
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Definition at line 27 of file pixeltypes.h.
#include <pixeltypes.h>
Public Member Functions | |
uint8_t & | operator[] (uint8_t x) |
Array access operator to index into the CHSV object. | |
const uint8_t & | operator[] (uint8_t x) const |
Array access operator to index into the CHSV object. | |
CHSV ()=default | |
Default constructor. | |
CHSV (uint8_t ih, uint8_t is, uint8_t iv) | |
Allow construction from hue, saturation, and value. | |
CHSV (const CHSV &rhs)=default | |
Allow copy construction. | |
CHSV & | operator= (const CHSV &rhs)=default |
Allow copy construction. | |
CHSV & | setHSV (uint8_t ih, uint8_t is, uint8_t iv) |
Assign new HSV values. | |
Public Attributes | ||
union { | ||
struct { | ||
union { | ||
uint8_t hue | ||
Color hue. More... | ||
uint8_t h | ||
Color hue. More... | ||
} | ||
union { | ||
uint8_t saturation | ||
Color saturation. More... | ||
uint8_t sat | ||
Color saturation. More... | ||
uint8_t s | ||
Color saturation. More... | ||
} | ||
union { | ||
uint8_t value | ||
Color value (brightness). More... | ||
uint8_t val | ||
Color value (brightness). More... | ||
uint8_t v | ||
Color value (brightness). More... | ||
} | ||
} | ||
uint8_t raw [3] | ||
Access the hue, saturation, and value data as an array. More... | ||
}; | ||
|
inlinedefault |
Default constructor.
|
inline |
Allow construction from hue, saturation, and value.
ih | input hue |
is | input saturation |
iv | input value |
Definition at line 82 of file pixeltypes.h.
|
inline |
Array access operator to index into the CHSV object.
x | the index to retrieve (0-2) |
Definition at line 63 of file pixeltypes.h.
|
inline |
Array access operator to index into the CHSV object.
x | the index to retrieve (0-2) |
Definition at line 69 of file pixeltypes.h.
|
inline |
Assign new HSV values.
ih | input hue |
is | input saturation |
iv | input value |
Definition at line 98 of file pixeltypes.h.
uint8_t CHSV::h |
Color hue.
This is an 8-bit value representing an angle around the color wheel. Where 0 is 0°, and 255 is 358°.
Definition at line 35 of file pixeltypes.h.
uint8_t CHSV::hue |
Color hue.
This is an 8-bit value representing an angle around the color wheel. Where 0 is 0°, and 255 is 358°.
Definition at line 34 of file pixeltypes.h.
uint8_t CHSV::raw[3] |
Access the hue, saturation, and value data as an array.
Where:
raw[0]
is the hueraw[1]
is the saturationraw[2]
is the value Definition at line 57 of file pixeltypes.h.
uint8_t CHSV::s |
Color saturation.
This is an 8-bit value representing a percentage.
Definition at line 42 of file pixeltypes.h.
uint8_t CHSV::sat |
Color saturation.
This is an 8-bit value representing a percentage.
Definition at line 41 of file pixeltypes.h.
uint8_t CHSV::saturation |
Color saturation.
This is an 8-bit value representing a percentage.
Definition at line 40 of file pixeltypes.h.
uint8_t CHSV::v |
Color value (brightness).
This is an 8-bit value representing a percentage.
Definition at line 49 of file pixeltypes.h.
uint8_t CHSV::val |
Color value (brightness).
This is an 8-bit value representing a percentage.
Definition at line 48 of file pixeltypes.h.
uint8_t CHSV::value |
Color value (brightness).
This is an 8-bit value representing a percentage.
Definition at line 47 of file pixeltypes.h.