FastLED 3.9.15
Loading...
Searching...
No Matches

◆ hsv2rgb_spectrum() [2/3]

void hsv2rgb_spectrum ( const CHSV & hsv,
CRGB & rgb )

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.

FastLED 'Spectrum' Hue Chart

Note
This function wraps hsv2rgb_raw() and rescales the hue value to fit the smaller range.
Parameters
hsvCHSV struct to convert to RGB. Max hue supported is HUE_MAX_SPECTRUM
rgbCRGB struct to store the result of the conversion (will be modified)

Definition at line 237 of file hsv2rgb.cpp.hpp.

238{
239 CHSV hsv2(hsv);
240 hsv2.hue = scale8( hsv2.hue, 191);
241 hsv2rgb_raw(hsv2, rgb);
242}
fl::hsv8 CHSV
Definition chsv.h:11
void hsv2rgb_raw(const CHSV &hsv, CRGB &rgb)
Convert an HSV value to RGB using a mathematically straight spectrum.

References hsv2rgb_raw().

+ Here is the call graph for this function: