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 47 of file crgb.h.
48{
49#if defined(FASTLED_HSV_CONVERSION_SPECTRUM)
51#elif defined(FASTLED_HSV_CONVERSION_FULL_SPECTRUM)
53#elif defined(FASTLED_HSV_CONVERSION_RAINBOW)
55#else
56
58#endif
59}
CRGB hsv2rgb_spectrum(const CHSV &hsv)
Inline version of hsv2rgb_spectrum which returns a CRGB object.
CRGB hsv2rgb_rainbow(const CHSV &hsv)
void hsv2rgb_fullspectrum(const CHSV &hsv, CRGB &rgb)
Converts an HSV value to RGB using the algorithm from here: https://en.wikipedia.org/wiki/HSL_and_HSV...
References FASTLED_FORCE_INLINE, hsv2rgb_fullspectrum(), hsv2rgb_rainbow(), and hsv2rgb_spectrum().