class PrecalculatedPalette(Palette):
Known subclasses: igraph.drawing.colors.ClusterColoringPalette
A palette that returns colors from a pre-calculated list of colors
Method | __init__ |
Creates the palette backed by the given list. The list must contain RGBA quadruplets or color names, which will be resolved first by color_name_to_rgba() . Anything that is understood by color_name_to_rgba() ... |
Method | _get |
This method will only be called if the requested color index is outside the size of the palette. In that case, we throw an exception |
Inherited from Palette
:
Method | __len__ |
Returns the number of colors in this palette |
Method | __plot__ |
Plots the colors of the palette on the given Cairo context |
Method | __repr__ |
Undocumented |
Method | clear |
Clears the result cache. |
Method | get |
Returns the given color from the palette. |
Method | get |
Returns multiple colors from the palette. |
Property | length |
Returns the number of colors in this palette |
Instance Variable | _cache |
Undocumented |
Instance Variable | _length |
Undocumented |
igraph.drawing.colors.Palette.__init__
igraph.drawing.colors.ClusterColoringPalette
Creates the palette backed by the given list. The list must contain RGBA quadruplets or color names, which will be resolved first by color_name_to_rgba()
. Anything that is understood by color_name_to_rgba()
is OK here.
igraph.drawing.colors.Palette._get
This method will only be called if the requested color index is outside the size of the palette. In that case, we throw an exception