Representation of an HSV pixel (hue, saturation, value (aka brightness)).
- Examples
- AnalogOutput.ino, ColorPalette.ino, Noise.ino, OctoWS2811Demo.ino, ParallelOutputDemo.ino, RGBSetDemo.ino, SmartMatrix.ino, and XYMatrix.ino.
Definition at line 11 of file chsv.h.
#include <chsv.h>
|
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.
|
|
constexpr | CHSV () |
| Default constructor.
|
|
constexpr | CHSV (uint8_t ih, uint8_t is, uint8_t iv) |
| Allow construction from hue, saturation, and value.
|
|
constexpr | CHSV (const CHSV &rhs) noexcept |
| 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.
|
|
◆ CHSV() [1/3]
Default constructor.
- Warning
- Default values are UNITIALIZED!
Definition at line 60 of file chsv.h.
◆ CHSV() [2/3]
CHSV::CHSV |
( |
uint8_t | ih, |
|
|
uint8_t | is, |
|
|
uint8_t | iv ) |
|
inlineconstexpr |
Allow construction from hue, saturation, and value.
- Parameters
-
ih | input hue |
is | input saturation |
iv | input value |
Definition at line 66 of file chsv.h.
◆ CHSV() [3/3]
CHSV::CHSV |
( |
const CHSV & | rhs | ) |
|
|
inlineconstexprnoexcept |
Allow copy construction.
Definition at line 72 of file chsv.h.
◆ operator[]() [1/2]
uint8_t & CHSV::operator[] |
( |
uint8_t | x | ) |
|
|
inline |
Array access operator to index into the CHSV object.
- Parameters
-
x | the index to retrieve (0-2) |
- Returns
- the CHSV::raw value for the given index
Definition at line 47 of file chsv.h.
◆ operator[]() [2/2]
const uint8_t & CHSV::operator[] |
( |
uint8_t | x | ) |
const |
|
inline |
Array access operator to index into the CHSV object.
- Parameters
-
x | the index to retrieve (0-2) |
- Returns
- the CHSV::raw value for the given index
Definition at line 53 of file chsv.h.
◆ setHSV()
CHSV & CHSV::setHSV |
( |
uint8_t | ih, |
|
|
uint8_t | is, |
|
|
uint8_t | iv ) |
|
inline |
Assign new HSV values.
- Parameters
-
ih | input hue |
is | input saturation |
iv | input value |
- Returns
- reference to the CHSV object
Definition at line 82 of file 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 19 of file chsv.h.
◆ 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 18 of file chsv.h.
◆ raw
Access the hue, saturation, and value data as an array.
Where:
raw[0]
is the hue
raw[1]
is the saturation
raw[2]
is the value
Definition at line 41 of file chsv.h.
Color saturation.
This is an 8-bit value representing a percentage.
Definition at line 26 of file chsv.h.
◆ sat
Color saturation.
This is an 8-bit value representing a percentage.
Definition at line 25 of file chsv.h.
◆ saturation
Color saturation.
This is an 8-bit value representing a percentage.
Definition at line 24 of file chsv.h.
Color value (brightness).
This is an 8-bit value representing a percentage.
Definition at line 33 of file chsv.h.
◆ val
Color value (brightness).
This is an 8-bit value representing a percentage.
Definition at line 32 of file chsv.h.
◆ value
Color value (brightness).
This is an 8-bit value representing a percentage.
Definition at line 31 of file chsv.h.
The documentation for this struct was generated from the following file:
- /home/runner/work/FastLED/FastLED/src/chsv.h