matthewplotlib.colormaps
A collection of pre-defined colormaps. They generally come in two flavours:
- Continuous colormaps: Functions of type
float[...] -> uint8[..., 3]. They turn a batch of floats in the range [0.0, 1.0] into a batch of RGB triples. - Discrete colormaps: Functions of type
int[...] -> uint8[..., 3]. They turn a batch of integer indices into a batch of RGB triples by indexing into the color palette.
For example:

Red colormap. Simply embeds greyscale value into red channel.
Green colormap. Simply embeds greyscale value into green channel.
Blue colormap. Simply embeds greyscale value into blue channel.
Yellow colormap. Simply embeds greyscale value into red and green channels.
Magenta colormap. Simply embeds greyscale value into red and blue channels.
Cyan colormap. Simply embeds greyscale value into green and blue channels.
Diverging red/cyan colormap. Uses greyscale value to interpolate between cyan (0.0) and white (0.5) and red (1.0).
Diverging green/magenta colormap. Uses greyscale value to interpolate between magenta (0.0) and white (0.5) and green (1.0).
Diverging blue/yellow colormap. Uses greyscale value to interpolate between yellow (0.0) and white (0.5) and blue (1.0).
Cyberpunk colormap. Uses greyscale value to interpolate between magenta (0.) and cyan (1.).
Rainbow colormap. Effectively embeds greyscale values as hue in HSV color space.
Magma colormap by Nathaniel J. Smith and Stefan van der Walt (see https://bids.github.io/colormap/).
Discretised to 256 8-bit colours.
Inferno colormap by Nathaniel J. Smith and Stefan van der Walt (see https://bids.github.io/colormap/).
Discretised to 256 8-bit colours.
Plasma colormap by Nathaniel J. Smith and Stefan van der Walt (see https://bids.github.io/colormap/).
Discretised to 256 8-bit colours.
Viridis colormap by Nathaniel J. Smith, Stefan van der Walt, and Eric Firing (see https://bids.github.io/colormap/).
Discretised to 256 8-bit colours.
Sweetie-16 colour palette by GrafxKid (see https://lospec.com/palette-list/sweetie-16).
Input should be an array of indices in the range [0,15] (or else it will cycle).
PICO-8 colour palette (see https://pico-8.fandom.com/wiki/Palette).
Input should be an array of indices in the range [0,15] (or else it will cycle).
Matplotlib Tableau colourmap.
Input should be an array of indices in the range [0,9] (or else it will cycle).
Updated Tableau colourmap (more accessible).
Input should be an array of indices in the range [0,9] (or else it will cycle).