Skip to main content

cmcrameri

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

python versions

pypi Downloads

anaconda badge Conda Downloads

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

https://www.fabiocrameri.ch/colourmaps/

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 9.0 (2026-11-18).

Install

With pip:

python -m pip install cmcrameri

With conda:

conda install -c conda-forge cmcrameri

Usage example

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.axis('off')
plt.show()

For a discretized colormap like batlow split into 25 levels, you can use the .resampled method on any of the colormaps:

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

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 cmcrameri.cm.<colormapname>.

You can use tab autocompletion on cmcrameri.cm 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

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 cmcrameri.cm import paths

paths

Previous releases

Versions 1.x of this package were based on Scientific colour maps version 8.0 (2023-06-14).

License

This work is licensed under an MIT license.

Metadata

Release files for cmcrameri 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmcrameri 2.0.2
File Size Uploaded Provenance Actions
cmcrameri-2.0.2.tar.gz 292.1 kB With provenance Details for cmcrameri-2.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmcrameri 2.0.2
File Interpreter ABI Platform Actions
cmcrameri-2.0.2-py3-none-any.whl Python 3 none any Details for cmcrameri-2.0.2-py3-none-any.whl

Total release size: 591.3 kB

Release files / cmcrameri-2.0.2.tar.gz

Download URL cmcrameri-2.0.2.tar.gz
Size 292.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7c1c5ec8353bef64fd62b69eec0dd651a38c67016d3603a2ffd9bbcfa044c81b
BLAKE2b-256 checksum
How to use checksums
17b84c8115867ed7b7e3b5159b6bf84cacfa43d06e8f63fafead814d6d22c34f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / cmcrameri-2.0.2-py3-none-any.whl

Download URL cmcrameri-2.0.2-py3-none-any.whl
Size 299.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b066c1292e31e77e9e67e937674f87d90f78f809e0acf8b1402b991f42cbb79
BLAKE2b-256 checksum
How to use checksums
02775b99f4c5c09bf70c5a5b187c99b847843014382c6eca1b1bbe7a174a22ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for cmcrameri 2.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cmcrameri-2.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page