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

◆ fill_rainbow() [2/3]

void fl::fill_rainbow ( CRGB * targetArray,
int numToFill,
fl::u8 initialhue,
fl::u8 deltahue = 5 )

Fill a range of LEDs with a rainbow of colors.

The colors making up the rainbow are at full saturation and full value (brightness).

Parameters
targetArraya pointer to the LED array to fill
numToFillthe number of LEDs to fill in the array
initialhuethe starting hue for the rainbow
deltahuehow many hue values to advance for each LED

Definition at line 29 of file fill.cpp.hpp.

30 {
31 CHSV hsv;
32 hsv.hue = initialhue;
33 hsv.val = 255;
34 hsv.sat = 240;
35 for (int i = 0; i < numToFill; ++i) {
36 targetArray[i] = hsv;
37 hsv.hue += deltahue;
38 }
39}
fl::hsv8 CHSV
Definition chsv.h:11

Referenced by fill_rainbow(), and fl::DemoReel100::rainbow().

+ Here is the caller graph for this function: