FastLED 3.9.3
|
Functions for blending colors together
Functions | |
CRGB | blend (const CRGB &p1, const CRGB &p2, fract8 amountOfP2) |
Computes a new color blended some fraction of the way between two other colors. | |
CHSV | blend (const CHSV &p1, const CHSV &p2, fract8 amountOfP2, TGradientDirectionCode directionCode=SHORTEST_HUES) |
Computes a new color blended some fraction of the way between two other colors. | |
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. | |
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. | |
CRGB & | nblend (CRGB &existing, const CRGB &overlay, fract8 amountOfOverlay) |
Destructively modifies one color, blending in a given fraction of an overlay color. | |
CHSV & | nblend (CHSV &existing, const CHSV &overlay, fract8 amountOfOverlay, TGradientDirectionCode directionCode=SHORTEST_HUES) |
Destructively modifies one color, blending in a given fraction of an overlay color. | |
void | nblend (CRGB *existing, CRGB *overlay, uint16_t count, fract8 amountOfOverlay) |
Destructively blends a given fraction of a color array into an existing color array. | |
void | nblend (CHSV *existing, CHSV *overlay, uint16_t count, fract8 amountOfOverlay, TGradientDirectionCode directionCode=SHORTEST_HUES) |
Destructively blends a given fraction of a color array into an existing color array. | |
CHSV blend | ( | const CHSV & | p1, |
const CHSV & | p2, | ||
fract8 | amountOfP2, | ||
TGradientDirectionCode | directionCode = SHORTEST_HUES ) |
Computes a new color blended some fraction of the way between two other colors.
p1 | the first color to blend |
p2 | the second color to blend |
amountOfP2 | the fraction of p2 to blend into p1 |
directionCode | the direction to travel around the color wheel |
Definition at line 396 of file colorutils.cpp.
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.
src1 | the first array of colors to blend |
src2 | the second array of colors to blend |
dest | the destination array for the colors |
count | the number of LEDs to blend |
amountOfsrc2 | the fraction of src2 to blend into src1 |
directionCode | the direction to travel around the color wheel |
Definition at line 403 of file colorutils.cpp.
Computes a new color blended some fraction of the way between two other colors.
p1 | the first color to blend |
p2 | the second color to blend |
amountOfP2 | the fraction of p2 to blend into p1 |
Definition at line 319 of file colorutils.cpp.
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.
src1 | the first array of colors to blend |
src2 | the second array of colors to blend |
dest | the destination array for the colors |
count | the number of LEDs to blend |
amountOfsrc2 | the fraction of src2 to blend into src1 |
Definition at line 326 of file colorutils.cpp.
CHSV & nblend | ( | CHSV & | existing, |
const CHSV & | overlay, | ||
fract8 | amountOfOverlay, | ||
TGradientDirectionCode | directionCode = SHORTEST_HUES ) |
Destructively modifies one color, blending in a given fraction of an overlay color.
existing | the color to modify |
overlay | the color to blend into existing |
amountOfOverlay | the fraction of overlay to blend into existing |
directionCode | the direction to travel around the color wheel |
Definition at line 336 of file colorutils.cpp.
void nblend | ( | CHSV * | existing, |
CHSV * | overlay, | ||
uint16_t | count, | ||
fract8 | amountOfOverlay, | ||
TGradientDirectionCode | directionCode = SHORTEST_HUES ) |
Destructively blends a given fraction of a color array into an existing color array.
existing | the color array to modify |
overlay | the color array to blend into existing |
count | the number of colors to process |
amountOfOverlay | the fraction of overlay to blend into existing |
directionCode | the direction to travel around the color wheel |
Definition at line 386 of file colorutils.cpp.
Destructively modifies one color, blending in a given fraction of an overlay color.
existing | the color to modify |
overlay | the color to blend into existing |
amountOfOverlay | the fraction of overlay to blend into existing |
Definition at line 275 of file colorutils.cpp.
Destructively blends a given fraction of a color array into an existing color array.
existing | the color array to modify |
overlay | the color array to blend into existing |
count | the number of colors to process |
amountOfOverlay | the fraction of overlay to blend into existing |
Definition at line 310 of file colorutils.cpp.