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

◆ fill_gradient() [2/4]

template<typename T>
void fl::fill_gradient ( T * targetArray,
uint16_t numLeds,
const CHSV & c1,
const CHSV & c2,
const CHSV & c3,
TGradientDirectionCode directionCode = SHORTEST_HUES )

Fill a range of LEDs with a smooth HSV gradient between three HSV colors.

See also
fill_gradient()
Parameters
targetArraya pointer to the color array to fill
numLedsthe number of LEDs to fill
c1the starting color in the gradient
c2the middle color for the gradient
c3the end color for the gradient
directionCodethe direction to travel around the color wheel

Definition at line 204 of file fill.h.

206 {
207 uint16_t half = (numLeds / 2);
208 uint16_t last = numLeds - 1;
209 fill_gradient(targetArray, 0, c1, half, c2, directionCode);
210 fill_gradient(targetArray, half, c2, last, c3, directionCode);
211}
void fill_gradient(T *targetArray, uint16_t startpos, CHSV startcolor, uint16_t endpos, CHSV endcolor, TGradientDirectionCode directionCode=SHORTEST_HUES)
Fill a range of LEDs with a smooth HSV gradient between two HSV colors.
Definition fill.h:77

References fill_gradient(), and SHORTEST_HUES.

+ Here is the call graph for this function: