Skip to main content

Perceptually uniform colormaps from the Earthmover brand palette

Project description

earthmover-colormaps

Perceptually uniform colormaps built from the Earthmover brand palette. Designed for scientific visualization — monotonic lightness, colorblind-safe, and zero required dependencies.

earthmover colormaps

Install

uv add earthmover-colormaps

Or with pip:

pip install earthmover-colormaps

Or from source:

uv add git+https://github.com/earth-mover/earthmover-colormaps.git

Quick start

import earthmover_colormaps  # registers colormaps with matplotlib on import
import xarray as xr

ds = xr.tutorial.open_dataset("air_temperature")
ds.air.isel(time=0).plot(cmap="em.bloom")

quick-start output

import earthmover_colormaps registers everything with matplotlib's global registry, so the names work anywhere a cmap= argument is accepted (plt.imshow, plt.pcolormesh, xarray.plot(), cartopy, …).

Colormaps

Name Type
em.violet Sequential
em.lime Sequential
em.signal Sequential
em.diverging Diverging
em.ocean Sequential
em.bloom Sequential
em.cycle Cyclic

Every colormap has a reversed variant (append _r): "em.signal_r", "em.violet_r", etc.

Access patterns

import earthmover_colormaps

# 1. String name (after import registers them with matplotlib)
plt.imshow(data, cmap="em.signal")

# 2. Attribute access (short name, no "em." prefix)
earthmover_colormaps.signal
earthmover_colormaps.diverging
earthmover_colormaps.bloom

# 3. Dict access (full name)
earthmover_colormaps.cm["em.signal"]
earthmover_colormaps.cm["em.signal_r"]

Setting as default

To use an Earthmover colormap as your default across all plots:

import earthmover_colormaps
import matplotlib as mpl

mpl.rcParams["image.cmap"] = "em.signal"

Or in a matplotlibrc file:

image.cmap: em.signal

Design

Linear J' lightness in CAM02-UCS, gamut-clipped chroma, validated under simulated deuteranopia / protanopia / tritanopia.

To inspect any map (or compare against a matplotlib builtin):

uv run --group design python tools/compare_gui.py

Releasing

Versions come from git tags via hatch-vcs — no edits to pyproject.toml. To cut a release:

git tag v0.2.0
git push origin v0.2.0
gh release create v0.2.0 --generate-notes

Publishing the GitHub release fires .github/workflows/publish.yml, which builds and uploads to PyPI via OIDC trusted publishing.

License

Apache 2.0. See 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

earthmover_colormaps-0.1.0.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

earthmover_colormaps-0.1.0-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

Details for the file earthmover_colormaps-0.1.0.tar.gz.

File metadata

  • Download URL: earthmover_colormaps-0.1.0.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for earthmover_colormaps-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b9c424a362b2c4ca66ed70310af12165459f8a45ebfe96cd2b9bce7baee9b4e
MD5 8edefb1bec94ae6d60507aa68b7a9192
BLAKE2b-256 4d930753c124d75b4900fc17a55f91effd478b531d87d6185925402a48b2ee8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for earthmover_colormaps-0.1.0.tar.gz:

Publisher: publish.yml on earth-mover/earthmover-colormaps

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file earthmover_colormaps-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for earthmover_colormaps-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4e4debf48ef126d09c03d6f5b817baaa3f79dd3a8c34a13082f38f62c236a72
MD5 096d0b7d7626d3fb37cc6c326aca70cb
BLAKE2b-256 e8623fe3238cdcdc9c7db7114a81b577d66d4a61c62a1f4562af1098cf1ac708

See more details on using hashes here.

Provenance

The following attestation bundles were made for earthmover_colormaps-0.1.0-py3-none-any.whl:

Publisher: publish.yml on earth-mover/earthmover-colormaps

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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