cmcrameri
Perceptually uniform colormaps by Fabio Crameri
What it is and what it does
cmcrameri is a Python wrapper that brings Fabio Crameri's scientifically designed colormaps into matplotlib. The package registers a collection of perceptually uniform colormaps—colormaps engineered to represent data changes uniformly across the full range of colors, making them suitable for scientific publication. You import the colormaps directly or by registered string name and use them with matplotlib's standard plotting functions.
The package ships the original colormap definitions and provides convenient access through tab-completable attributes. You can discretize colormaps into a specific number of levels, reverse them by appending `_r`, and access categorical variants with the `S` suffix. It requires matplotlib and numpy as runtime dependencies and supports Python 3.7 and later.
Use it for:
- Create publication-ready scientific plots where color gradients must remain perceptually uniform across print and digital media.
- Build heatmaps and contour plots in geophysics, oceanography, or climate science where standard colormaps introduce perceptual bias.
- Discretize continuous colormaps into categorical levels for segmented data visualization without losing perceptual uniformity.
- Integrate Crameri's colormaps into existing matplotlib workflows using registered string names like 'cmc.batlow'.
- Access reversed colormaps by appending `_r` to colormap names for inverted data representations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides perceptually uniform colormaps by Fabio Crameri for matplotlib, enabling scientific visualizations designed to be readable across different media and accessible to colorblind viewers.
Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a real problem for scientific visualization. If you create plots for publication or need colormaps designed for perceptual uniformity, this is a straightforward addition to matplotlib. The MIT license imposes no restrictions.
Install
cmcrameri on PyPI
pip
pip install cmcrameriuv
uv add cmcrameripoetry
poetry add cmcrameriInstalling cmcrameri
Before you install
Low install friction with a pure Python wheel distribution. The package is actively maintained with a recent release and supports Python 3.7 through 3.14. Dependencies are minimal: matplotlib, numpy, and packaging.
License in practice
MIT license permits unrestricted use, modification, and distribution. The colormaps are copyrighted by Fabio Crameri; the Python packaging and scripts are copyrighted by Callum Rollo, both under MIT terms.
Quickstart
pip install cmcrameri
import cmcrameri.cm 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)
plt.show()
Verify before relying
- Whether colormaps are tested or validated for colorblind-friendly perception beyond Crameri's original design claims.
Package facts
| License | MIT License Colormaps in cmcrameri/cm/cmaps: Copyright (c) 2020 Fabio Crameri Python scripts and packaging: Copyright (c) 2020 Callum Rollo Permission is hereby granted, free of charge, to any person… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — matplotlib, numpy, packaging |
| Maintenance | actively maintained — 10 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 111,890/month — #12,391 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cmcrameri-1.10-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
cmapcmap provides a collection of scientific…
permissive · top 15,000 on PyPI
cmoceanProvides perceptually uniform colormaps…
unclear · top 15,000 on PyPI
colorcetColorcet provides a collection of perceptually…
unclear · top 5,000 on PyPI
cmweathercmweather provides a collection of colormaps…
permissive · top 15,000 on PyPI
colorspaciousConverts colors between standard and…
permissive · top 15,000 on PyPI
colourmapGenerates unique RGB and HEX colors from input…
permissive · top 15,000 on PyPI
distinctipyGenerates lists of visually distinct colors of…
permissive · top 15,000 on PyPI
fabioFabIO reads and writes 2D X-ray detector images…
permissive · top 15,000 on PyPI
brewer2mplProvides access to all 165 ColorBrewer2.org…
permissive · top 15,000 on PyPI
matplotlib-scalebarAdds a matplotlib artist that renders a…
permissive · top 15,000 on PyPI