From 12127ccdacb46bf30167785070732c347694fb8a Mon Sep 17 00:00:00 2001 From: David Madison Date: Mon, 9 Aug 2021 16:26:24 -0400 Subject: 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. --- src/colorutils.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/colorutils.h') 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, -- cgit v1.2.3