Metadata-Version: 2.4
Name: protan
Version: 0.1.0
Summary: Simulate protanopia (red-blind) color vision — a typed shortcut over cvdsim / the OpticQuiz engine (Machado, Oliveira & Fernandes 2009).
Author: Vince Gonzalez
License: MIT
Project-URL: Homepage, https://opticquiz.com/
Project-URL: Source, https://github.com/vince-gonzalez/opticquiz.com
Keywords: protan,protan,colorblind,color-blindness,cvd,simulate,color-vision,accessibility,a11y
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cvdsim>=0.1.0
Provides-Extra: image
Requires-Dist: cvdsim[image]>=0.1.0; extra == "image"
Dynamic: license-file

# protan

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

```bash
pip install protan          # color only
pip install "protan[image]" # + image recoloring
```

```python
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.
