FastLED 3.9.15
|
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.
This function can write the gradient colors either:
In the case of writing into a CRGB array, the gradient is computed in HSV space, and then HSV values are converted to RGB as they're written into the CRGB array.
targetArray | a pointer to the color array to fill |
startpos | the starting position in the array |
startcolor | the starting color for the gradient |
endpos | the ending position in the array |
endcolor | the end color for the gradient |
directionCode | the direction to travel around the color wheel |
Definition at line 189 of file colorutils.h.
References BACKWARD_HUES, FORWARD_HUES, LONGEST_HUES, saccum87, and SHORTEST_HUES.
Referenced by CHSVPalette16::CHSVPalette16(), CHSVPalette16::CHSVPalette16(), CHSVPalette16::CHSVPalette16(), CHSVPalette256::CHSVPalette256(), CHSVPalette256::CHSVPalette256(), CHSVPalette256::CHSVPalette256(), CHSVPalette32::CHSVPalette32(), CHSVPalette32::CHSVPalette32(), CHSVPalette32::CHSVPalette32(), CRGBPalette16::CRGBPalette16(), CRGBPalette16::CRGBPalette16(), CRGBPalette16::CRGBPalette16(), CRGBPalette256::CRGBPalette256(), CRGBPalette256::CRGBPalette256(), CRGBPalette256::CRGBPalette256(), CRGBPalette32::CRGBPalette32(), CRGBPalette32::CRGBPalette32(), CRGBPalette32::CRGBPalette32(), fill_gradient(), fill_gradient(), and fill_gradient().