Skip to main content

tritanopia

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

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

Built distribution (wheel)

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

Total release size: 6.0 kB

Release files / tritanopia-0.1.0.tar.gz

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

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

Download URL tritanopia-0.1.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
902f0e51b6979dc5716cc62b004c47a50c14605c0a179a7d5deed0ea06c50986
BLAKE2b-256 checksum
How to use checksums
3bafdc21ed8838849519c170a2dc8767274fd7fece49b8fd1075651d79f92242
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