diff options
author | David Madison <dmadison@users.noreply.github.com> | 2021-08-09 23:26:24 +0300 |
---|---|---|
committer | David Madison <dmadison@users.noreply.github.com> | 2021-08-09 23:26:24 +0300 |
commit | 12127ccdacb46bf30167785070732c347694fb8a (patch) | |
tree | ef081877c0e94d656e36aca0b4ed306631a337d1 /src/colorutils.h | |
parent | 5cc17b2be88982eb34b1998de22b83fee56d4f07 (diff) |
Add fill_rainbow_endless util functions
For filling a rainbow pattern that's continuous in hue between the end of the strip and the beginning. Useful for out-of-the-box rainbow animations on looped strips and LED rings.
Diffstat (limited to 'src/colorutils.h')
-rw-r--r-- | src/colorutils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/colorutils.h b/src/colorutils.h index f09d525f..237e9400 100644 --- a/src/colorutils.h +++ b/src/colorutils.h @@ -37,6 +37,21 @@ void fill_rainbow( struct CHSV * targetArray, int numToFill, uint8_t deltahue = 5); +/// fill_rainbow_endless - fill a range of LEDs with a rainbow of colors, at +/// full saturation and full value (brightness), +/// so that the hues are continuous between the end +/// of the strip and the beginning +void fill_rainbow_endless(struct CRGB* targetArray, int numToFill, + uint8_t initialhue); + +/// fill_rainbow_endless - fill a range of LEDs with a rainbow of colors, at +/// full saturation and full value (brightness), +/// so that the hues are continuous between the end +/// of the strip and the beginning +void fill_rainbow_endless(struct CHSV* targetArray, int numToFill, + uint8_t initialhue); + + // fill_gradient - fill an array of colors with a smooth HSV gradient // between two specified HSV colors. // Since 'hue' is a value around a color wheel, |