Skip to main content

deutan

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

pip install deutan          # color only
pip install "deutan[image]" # + image recoloring
import deutan
deutan.simulate("#d7191c")            # that red as deuteranopia sees it
from PIL import Image
deutan.simulate_image(Image.open("chart.png")).save("chart-deutan.png")
  • simulate(color, severity=1.0) → hex, as deuteranopia 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 deutan 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 deutan 0.1.0
File Size Uploaded
deutan-0.1.0.tar.gz 2.9 kB Details

Built distribution (wheel)

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

Total release size: 6.0 kB

Release files / deutan-0.1.0.tar.gz

Download URL deutan-0.1.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1ea7c93006d458e7e51ab8b948300b4929c69813b8b73320394af3aff214dc28
BLAKE2b-256 checksum
How to use checksums
7f2092977b50a3f79f21ad3e30cb9f6418a79ec5330c168d8376909de3d539b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL deutan-0.1.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba776e381c5a2c3c01da453219242946302f5c1326931142cc9a4c0be17fca34
BLAKE2b-256 checksum
How to use checksums
2c7292f8ea9eb9ce0396e0789c4f032bfadea5c8078d7816a17f43bee7b27817
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