Class Palette¶
Defined in File palette.h
Class Documentation¶
-
class
Palette
¶ Public Functions
-
Palette
(const Colors::RGB colors[], uint8_t size)¶ Constructor. Sets the Palette’s colors.
- Parameters
colors
: Source color array.size
: Number of colors in the array.
-
~Palette
()¶
-
Colors::RGB &
get_color_at_index
(uint8_t index) const¶ Returns the color at the specified index. If the index exceeds the size of the color palette, the index wraps around to the start of the array and counts the remainder. For example, if the Section has 10 Pixels and 5 Colors, the Pixel at index 7 will use the color at index 2 (7 % 5 == 2). Used mainly to determine which color a Pixel should use during an animation based on where it is in the array.
- Return
Color at the specified index.
- Parameters
index
: Desired index.
-