Convert an HSV value to RGB using a mathematically straight spectrum.
This "spectrum" will have more green and blue than a "rainbow", and less yellow and orange.

- Note
- This function wraps hsv2rgb_raw() and rescales the hue value to fit the smaller range.
- Parameters
-
hsv | CHSV struct to convert to RGB. Max hue supported is HUE_MAX_SPECTRUM |
rgb | CRGB struct to store the result of the conversion (will be modified) |
Definition at line 226 of file hsv2rgb.cpp.
227{
229 hsv2.hue =
scale8( hsv2.hue, 191);
231}
void hsv2rgb_raw(const struct CHSV &hsv, struct CRGB &rgb)
Convert an HSV value to RGB using a mathematically straight spectrum.
LIB8STATIC_ALWAYS_INLINE uint8_t scale8(uint8_t i, fract8 scale)
Scale one byte by a second one, which is treated as the numerator of a fraction whose denominator is ...
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
References hsv2rgb_raw(), and scale8().
Referenced by hsv2rgb_spectrum(), and hsv2rgb_spectrum().