Color Functions

Setting Colors

There are four colors associated with each pixel, three of which can be set directly (see Pixel Colors). Each color type (Fade, Prolonged, Temporary) can be set for one or multiple pixels. Each function is an extension for AnimationManager, SectionManager, and LEDStrip instances.

setPixel<type>Color takes a pixel index and a color. - Fade, Prolonged, Temporary

setPixel<type>Colors takes a list of pixel indices or an IntRange of pixel indices and a color - Fade, Prolonged, Temporary

There are also functions for reverting pixel(s) (removing any temporary color set). One pixel or multiple pixels can be reverted at once.

The color of the full strip (or section that the animation is running in) can be set with setStrip<type>Color - Fade, Prolonged, Temporary

clear() will remove all colors set to all pixels in the strip (or section).

Getting Colors

There are four colors associated with each pixel (see Pixel Colors). Each color type (Actual, Fade, Prolonged, Temporary) can be retrieved for one or all pixels. Each function is an extension for AnimationManager, SectionManager, and LEDStrip instances. Each property is an extension for LEDStripColorManager, LEDStrip, and SectionManager instances.

getPixel<type>Color returns the color set for the specified pixel - Actual, Fade, Prolonged, Temporary

Each function has a nullable counterpart named getPixel<type>ColorOrNull - Actual, Fade, Prolonged, Temporary

The colors of all pixels in the strip (or section) can be retrieved with the pixel<type>ColorList properties - Actual, Fade, Prolonged, Temporary