Skip to main content

protan

Simulate protanopia (red-blind) color vision — the color, or a whole image, as a protanopia viewer sees it. A typed shortcut over cvdsim: every call is cvdsim's with the deficiency fixed to protan.

pip install protan          # color only
pip install "protan[image]" # + image recoloring
import protan
protan.simulate("#d7191c")            # that red as protanopia sees it
from PIL import Image
protan.simulate_image(Image.open("chart.png")).save("chart-protan.png")
  • simulate(color, severity=1.0) → hex, as protanopia sees it.
  • simulate_image(image, severity=1.0) → a recolored PIL Image (path or Image in).

Built on the published method: https://doi.org/10.5281/zenodo.21310578 · Screening/design aid, not a clinical tool.

Licence

MIT.

Metadata

Release files for protan 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 protan 0.1.0
File Size Uploaded
protan-0.1.0.tar.gz 2.8 kB Details

Built distribution (wheel)

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

Total release size: 5.9 kB

Release files / protan-0.1.0.tar.gz

Download URL protan-0.1.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
67a41e7045abc701fbf3a3d6b0809b980a537f714680cfba2de32f3f1f9b079a
BLAKE2b-256 checksum
How to use checksums
471b182d8b38b78d901492e27a2e9e0db75309c5e9b3a8a903f76a80e08c815b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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