Package-level declarations
Types
A class for storing colors that can be used in animations. This can store a variable number of colors (stored as 24-bit Int
s).
An interface connecting ColorContainer and PreparedColorContainer
A set of colors ready for use with a LED strip. Colors blend from one to the next along the length of the strip.
Properties
Functions
Replaces all colors in ColorContainer.colors with a grayscaled version of themselves.
Returns the 'grayscale' version of a 24-bit color.
Replaces the colors at the indices in the specified ranges with a grayscaled version of themselves.
Replaces the colors at the specified indices with a grayscaled version of themselves.
Returns a new ColorContainer with the same colors as this instance, but grayscaled.
Returns a new ColorContainer with the same colors as this instance, grayscaled, but only including the ranges of indices specified.
Returns a new ColorContainer with the same colors as this instance, grayscaled, but only including the indices specified.
Returns a new ColorContainer with the same colors as this instance, but inverted.
Returns a new ColorContainer with the same colors as this instance, inverted, but only including the ranges of indices specified.
Returns a new ColorContainer with the same colors as this instance, inverted, but only including the indices specified.
Replaces all colors in ColorContainer.colors with their inverse.
Replaces the colors at the indices in the specified ranges with their inverse
Replaces the colors at the specified indices with their inverse.
Report whether colors
is empty
Report whether colors
is not empty
Returns an Int
from a hexadecimal string or default
on error
Helper function for removing the 0x prefix from a hex string
Create a PreparedColorContainer with the same colors as this PreparedColorContainer, shifted by offset
. The color at index 0
will be moved to index offset
. Negative offsets and offsets that are larger than the size of colors
are supported.
Create a ColorContainer from this Int
Create a ColorContainer from this Long
Operator overload that returns a new ColorContainer containing the inverse of the colors in this ColorContainer.