PixelColor

data class PixelColor(val pixelNumber: Int)

Tracks a single pixel's colors. Each pixel has 4 colors, actualColor, fadeColor, prolongedColor and temporaryColor. A pixel's color will be set to temporaryColor if temporaryColor is not -1, otherwise to fadeColor if fadeColor is not -1, otherwise to prolongedColor.

Constructors

Link copied to clipboard
constructor(pixelNumber: Int)

Properties

Link copied to clipboard

The color seen on the strip

Link copied to clipboard

A color that is being faded to the prolonged color

Link copied to clipboard

The index of the pixel this

Link copied to clipboard

The color that should be shown if the temporary and fade colors are not set, and the color that will be faded to

Link copied to clipboard

A color to show regardless of what the other colors are, essentially overriding everything

Functions

Link copied to clipboard
fun getColor(colorType: PixelColorType): Int

Get the pixel's color

Link copied to clipboard

Resets temporaryColor to -1, effectively reverting the pixel to whatever state it would be in without the temporaryColor override

Link copied to clipboard
fun sendColorToStrip(ledStrip: NativeLEDStrip, doFade: Boolean)

Sends the color for a pixel to the strip. A pixel's color will be set to temporaryColor if temporaryColor is not -1, otherwise to fadeColor if fadeColor is not -1, otherwise to prolongedColor.

Link copied to clipboard
fun setColor(color: Int, colorType: PixelColorType)

Set the pixel's color