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

◆ setHSV()

CRGB & fl::CRGB::setHSV ( u8 hue,
u8 sat,
u8 val )

Allow assignment from hue, saturation, and value.

Set HSV values and convert to RGB.

Parameters
huecolor hue
satcolor saturation
valcolor value (brightness)
Note
For array operations with many pixels, consider using fill_rainbow() or fill_gradient<>() in fl/fill.h instead, which are optimized for bulk HSV-to-RGB conversions and significantly faster on most platforms due to loop unrolling and SIMD opportunities.

Definition at line 49 of file crgb_extra.cpp.hpp.

49 {
50 CHSV hsv_color(hue, sat, val);
51 hsv2rgb_rainbow(hsv_color, *this);
52 return *this;
53}
uint8_t hue
Definition advanced.h:94
fl::hsv8 CHSV
Definition chsv.h:11
CRGB hsv2rgb_rainbow(const CHSV &hsv)

References CRGB(), hsv2rgb_rainbow(), and hue.

+ Here is the call graph for this function: