dichromacy
Simulate the three dichromacies — protanopia, deuteranopia, tritanopia. A color or a whole image as a dichromat (missing one cone type) sees it.
pip install dichromacy
import "dichromacy"
dichromacy.simulate("#d7191c", "deutan"); // that red to a deuteranope
dichromacy.protan("#1a9641"); // green to a protanope
const png = dichromacy.simulateImage("./chart.png", "tritan");
simulate(color, type, severity?)→ hex.typeis"protan","deutan", or"tritan".simulateImage(input, type, opts?)→ a recolored PNG Buffer.protan/deutan/tritan(color, severity?)→ the named shortcuts.
An umbrella over cvdsim (Machado, Oliveira & Fernandes 2009). For total color blindness see achromatopsia; for mild vision see trichromacy. A simulation, not a diagnosis.
Licence
MIT.
Metadata
Release files for dichromacy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dichromacy-0.1.0.tar.gz | 2.9 kB | Without provenance | Details for dichromacy-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dichromacy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dichromacy-0.1.0-py3-none-any.whl |
Total release size: 6.1 kB
Release files / dichromacy-0.1.0.tar.gz
| Download URL | dichromacy-0.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c292be89c0886b98a03f29e5298ab059fe9a6dd1013700707d22a961896a155
|
|
BLAKE2b-256 checksum How to use checksums |
f93ca51ecc9b278dfdca9efdb7b3715f3449e39019bacd563a573840c5caad19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / dichromacy-0.1.0-py3-none-any.whl
| Download URL | dichromacy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4d92da47a166c4437544bfd4089eb4dc19294f299948c93ad3243ac312d4f94
|
|
BLAKE2b-256 checksum How to use checksums |
c5cc6ad4ee55a85cf12e6941673cfb5a2dcf360158c68d0374ca1c4e51c76e85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for dichromacy 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.