Skip to main content

cvdmaps

Colorblind-safe colormaps and color cycles for matplotlib. matplotlib's default color cycle (tab10) is not colorblind-safe — cvdmaps fixes that in one call, and every palette it ships is verified safe under protanopia, deuteranopia, and tritanopia.

pip install cvdmaps
import cvdmaps
cvdmaps.set_cycle()                 # every plot from here uses a colorblind-safe cycle

import matplotlib.pyplot as plt
plt.plot(x, y1); plt.plot(x, y2)    # colors now stay distinct for colorblind viewers

cvdmaps.palette("okabe_ito")        # ['#000000', '#E69F00', '#56B4E9', ...]
plt.imshow(data, cmap="okabe_ito_nb")   # registered colormaps, usable by name

API

  • set_cycle(name="okabe_ito_nb") — set matplotlib's default color cycle to a colorblind-safe palette. The one call that makes all your plots safe.
  • palette(name="okabe_ito", n=None) — the palette as a list of hex colors (optionally first n).
  • register() — (re)register the colormaps with matplotlib; runs automatically on import.
  • names() — ['okabe_ito', 'okabe_ito_nb'].

okabe_ito is the 8-color set (incl. black); okabe_ito_nb drops black for line plots on white.

Why trust it

The palettes are the Okabe–Ito colorblind-safe set, and each one passes the OpticQuiz cvdsafe check — the same Machado 2009 + CIEDE2000 engine behind the rest of the suite. Nothing ships that our own checker rejects. For a sequential colorblind-safe map, matplotlib's built-in cividis is a good default.

Licence

MIT.

Metadata

Release files for cvdmaps 0.1.0

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

Source distribution (sdist)

Source distribution for cvdmaps 0.1.0
File Size Uploaded Provenance
cvdmaps-0.1.0.tar.gz 3.9 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 8.1 kB

Release files / cvdmaps-0.1.0.tar.gz

Download URL cvdmaps-0.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ef33f595bf3bbbfac70ea1a648397895d4a94678ee4596bd1397e2cab111a821
BLAKE2b-256 checksum
How to use checksums
eeb428647c38a48e7a2437dc768fb67c0fb3570c65fb1e4fa5428bb798482f18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / cvdmaps-0.1.0-py3-none-any.whl

Download URL cvdmaps-0.1.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ace8afbd0f4b5ff7ad319cdc7a7c42df8c626fe16f34b49af2125421ca507ed
BLAKE2b-256 checksum
How to use checksums
a7319c2a112d522e14d720ed03a1f18476fb1e349f656e3a3d2ac0df484b4924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for cvdmaps 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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