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 | |
|---|---|---|---|
| dichromacy-0.1.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dichromacy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
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
|