pestifer.util.colors module

Definition of the PestiferColor class for handling color definitions in Pestifer. This class is used to create a list of colors based on a specified matplotlib colormap. It inherits from collections.UserList and provides a way to access colors in a structured manner.

class pestifer.util.colors.PestiferColorMap(mpl_colormapname)[source]

Bases: UserList

A class for handling color definitions in Pestifer, based on a specified matplotlib colormap.

hue(x: float)[source]

Get a color from the colormap based on a float input in the range [0, 1].

Parameters:

x (float) – A float value in the range [0, 1] to select a color from the colormap.

Returns:

The corresponding ColorRGB object from the colormap.

Return type:

ColorRGB