HSV conversion function selection based on compile-time defines This allows users to configure which HSV conversion algorithm to use by setting one of the following defines:
- FASTLED_HSV_CONVERSION_SPECTRUM: Use spectrum conversion
- FASTLED_HSV_CONVERSION_FULL_SPECTRUM: Use full spectrum conversion
- FASTLED_HSV_CONVERSION_RAINBOW: Use rainbow conversion (explicit)
- Default (no define): Use rainbow conversion (backward compatibility) Array-based HSV conversion function selection using the same compile-time defines
- Parameters
-
| phsv | CHSV array to convert to RGB |
| prgb | CRGB array to store the result of the conversion (will be modified) |
| numLeds | the number of array values to process |
Definition at line 48 of file crgb.h.
49 {
50#if defined(FASTLED_HSV_CONVERSION_SPECTRUM)
52#elif defined(FASTLED_HSV_CONVERSION_FULL_SPECTRUM)
54#elif defined(FASTLED_HSV_CONVERSION_RAINBOW)
56#else
57
59#endif
60}
void hsv2rgb_fullspectrum(const CHSV &hsv, CRGB &rgb) FL_NO_EXCEPT
Converts an HSV value to RGB using the algorithm from here: https://en.wikipedia.org/wiki/HSL_and_HSV...
CRGB hsv2rgb_rainbow(const CHSV &hsv) FL_NO_EXCEPT
CRGB hsv2rgb_spectrum(const CHSV &hsv) FL_NO_EXCEPT
Inline version of hsv2rgb_spectrum which returns a CRGB object.
References FASTLED_FORCE_INLINE, FL_NO_EXCEPT, hsv2rgb_fullspectrum(), hsv2rgb_rainbow(), and hsv2rgb_spectrum().