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

◆ blend() [4/4]

CRGB * blend ( const CRGB * src1,
const CRGB * src2,
CRGB * dest,
uint16_t count,
fract8 amountOfsrc2 )

Computes a new blended array of colors, each some fraction of the way between corresponding elements of two source arrays of colors.

Useful for blending palettes.

Parameters
src1the first array of colors to blend
src2the second array of colors to blend
destthe destination array for the colors
countthe number of LEDs to blend
amountOfsrc2the fraction of src2 to blend into src1

Definition at line 354 of file colorutils.cpp.

355{
356 for( uint16_t i = 0; i < count; ++i) {
357 dest[i] = blend(src1[i], src2[i], amountOfsrc2);
358 }
359 return dest;
360}
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
Computes a new color blended some fraction of the way between two other colors.

References blend().

+ Here is the call graph for this function: