bibliopixel.colors.palette module¶
-
class
bibliopixel.colors.palette.
Palette
(colors=(), continuous=False, serpentine=False, scale=1, offset=0, autoscale=False, length=None)[source]¶ Bases:
list
Palette is a list of one or more colors used to render Animations.
The method
Palette.get()
takes a position in the pallete and returns a color.-
get
(position=0)[source]¶ Return a color interpolated from the Palette.
In the case where continuous=False, serpentine=False, scale=1, autoscale=False, and offset=0, this is exactly the same as plain old [] indexing, but with a wrap-around.
The constructor parameters affect this result as documented in the constructor.
- Arguments:
position
:- May be any integer or floating point number
-