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

◆ fill_gradient_RGB() [3/4]

void fl::fill_gradient_RGB ( CRGB * leds,
uint16_t numLeds,
const CRGB & c1,
const CRGB & c2,
const CRGB & c3,
const CRGB & c4 )

Fill a range of LEDs with a smooth RGB gradient between four RGB colors.

See also
fill_gradient_RGB()
Parameters
ledsa pointer to the LED array to fill
numLedsthe number of LEDs to fill
c1the starting color in the gradient
c2the first middle color for the gradient
c3the second middle color for the gradient
c4the end color for the gradient

Definition at line 163 of file fill.cpp.

164 {
165 uint16_t onethird = (numLeds / 3);
166 uint16_t twothirds = ((numLeds * 2) / 3);
167 uint16_t last = numLeds - 1;
168 fill_gradient_RGB(leds, 0, c1, onethird, c2);
169 fill_gradient_RGB(leds, onethird, c2, twothirds, c3);
170 fill_gradient_RGB(leds, twothirds, c3, last, c4);
171}
CRGB leds[NUM_LEDS]
Definition Apa102.ino:11
void fill_gradient_RGB(CRGB *leds, uint16_t startpos, CRGB startcolor, uint16_t endpos, CRGB endcolor)
Fill a range of LEDs with a smooth RGB gradient between two RGB colors.
Definition fill.cpp:107

References fill_gradient_RGB(), and leds.

+ Here is the call graph for this function: