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

◆ blend() [2/4]

CHSV * blend ( const CHSV * src1,
const CHSV * src2,
CHSV * dest,
uint16_t count,
fract8 amountOfsrc2,
TGradientDirectionCode directionCode = SHORTEST_HUES )

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
directionCodethe direction to travel around the color wheel

Definition at line 431 of file colorutils.cpp.

432{
433 for( uint16_t i = 0; i < count; ++i) {
434 dest[i] = blend(src1[i], src2[i], amountOfsrc2, directionCode);
435 }
436 return dest;
437}
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: