Skip to main content

Perceptually uniform colormaps by Fabio Crameri

Project description

Python package

Python 3.6 Python 3.7 Python 3.8 Python 3.9 Python 3.10 Python 3.11

Downloads (PyPI)

Conda Downloads (conda-forge)


This is a Python wrapper around Fabio Crameri's perceptually uniform colormaps.

All credit for creating the colormaps to Fabio. Any errors in the Python implementation of colormaps are my own.

This version is based on Scientific colour maps version 8.0 (2023-06-14).


With pip:

python -m pip install cmcrameri

With conda:

conda install -c conda-forge cmcrameri

Usage example

import as cmc
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0, 1, 100)[np.newaxis, :]

plt.imshow(x, aspect='auto', cmap=cmc.batlow)

Alternatively, the registered name string can be used.

import cmcrameri # required in order to register the colormaps with Matplotlib
plt.imshow(x, aspect='auto', cmap='cmc.batlow')

Extra instructions

You can access all the core colormaps from Fabio Crameri's list by<colormapname>.

You can use tab autocompletion on if your editor supports it.

For a reversed colormap, append _r to the colormap name.

Categorical colormaps have the suffix S.

For an image of all the available colormaps without leaving the comfort of your Python session:

from cmcrameri import show_cmaps


Figure demonstrating the colormaps

The original colormap text files are shipped as part of the package. Find them on your system with:

from import paths



This work is licensed under an MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmcrameri-1.7.tar.gz (260.1 kB view hashes)

Uploaded source

Built Distribution

cmcrameri-1.7-py3-none-any.whl (277.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page