tritanopia 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tritanopia-0.1.0/LICENSE +21 -0
- tritanopia-0.1.0/PKG-INFO +42 -0
- tritanopia-0.1.0/README.md +25 -0
- tritanopia-0.1.0/pyproject.toml +24 -0
- tritanopia-0.1.0/setup.cfg +4 -0
- tritanopia-0.1.0/tritanopia/__init__.py +23 -0
- tritanopia-0.1.0/tritanopia.egg-info/PKG-INFO +42 -0
- tritanopia-0.1.0/tritanopia.egg-info/SOURCES.txt +9 -0
- tritanopia-0.1.0/tritanopia.egg-info/dependency_links.txt +1 -0
- tritanopia-0.1.0/tritanopia.egg-info/requires.txt +4 -0
- tritanopia-0.1.0/tritanopia.egg-info/top_level.txt +1 -0
tritanopia-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vince Gonzalez (OpticQuiz)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tritanopia
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Simulate tritanopia (blue-yellow) color vision — a typed shortcut over cvdsim / the OpticQuiz engine (Machado, Oliveira & Fernandes 2009).
|
|
5
|
+
Author: Vince Gonzalez
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://opticquiz.com/
|
|
8
|
+
Project-URL: Source, https://github.com/vince-gonzalez/opticquiz.com
|
|
9
|
+
Keywords: tritanopia,tritan,colorblind,color-blindness,cvd,simulate,color-vision,accessibility,a11y
|
|
10
|
+
Requires-Python: >=3.8
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: cvdsim>=0.1.0
|
|
14
|
+
Provides-Extra: image
|
|
15
|
+
Requires-Dist: cvdsim[image]>=0.1.0; extra == "image"
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# tritanopia
|
|
19
|
+
|
|
20
|
+
Simulate **tritanopia** (blue-yellow) color vision — the color, or a whole image, as a tritanopia viewer sees it.
|
|
21
|
+
A typed shortcut over [`cvdsim`](https://pypi.org/project/cvdsim/): every call is `cvdsim`'s with
|
|
22
|
+
the deficiency fixed to `tritan`.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install tritanopia # color only
|
|
26
|
+
pip install "tritanopia[image]" # + image recoloring
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
import tritanopia
|
|
31
|
+
tritanopia.simulate("#d7191c") # that red as tritanopia sees it
|
|
32
|
+
from PIL import Image
|
|
33
|
+
tritanopia.simulate_image(Image.open("chart.png")).save("chart-tritan.png")
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- **`simulate(color, severity=1.0)`** → hex, as tritanopia sees it.
|
|
37
|
+
- **`simulate_image(image, severity=1.0)`** → a recolored PIL Image (path or Image in).
|
|
38
|
+
|
|
39
|
+
Built on the published method: https://doi.org/10.5281/zenodo.21310578 · Screening/design aid, not a clinical tool.
|
|
40
|
+
|
|
41
|
+
## Licence
|
|
42
|
+
MIT.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# tritanopia
|
|
2
|
+
|
|
3
|
+
Simulate **tritanopia** (blue-yellow) color vision — the color, or a whole image, as a tritanopia viewer sees it.
|
|
4
|
+
A typed shortcut over [`cvdsim`](https://pypi.org/project/cvdsim/): every call is `cvdsim`'s with
|
|
5
|
+
the deficiency fixed to `tritan`.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install tritanopia # color only
|
|
9
|
+
pip install "tritanopia[image]" # + image recoloring
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
import tritanopia
|
|
14
|
+
tritanopia.simulate("#d7191c") # that red as tritanopia sees it
|
|
15
|
+
from PIL import Image
|
|
16
|
+
tritanopia.simulate_image(Image.open("chart.png")).save("chart-tritan.png")
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- **`simulate(color, severity=1.0)`** → hex, as tritanopia sees it.
|
|
20
|
+
- **`simulate_image(image, severity=1.0)`** → a recolored PIL Image (path or Image in).
|
|
21
|
+
|
|
22
|
+
Built on the published method: https://doi.org/10.5281/zenodo.21310578 · Screening/design aid, not a clinical tool.
|
|
23
|
+
|
|
24
|
+
## Licence
|
|
25
|
+
MIT.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "tritanopia"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Simulate tritanopia (blue-yellow) color vision — a typed shortcut over cvdsim / the OpticQuiz engine (Machado, Oliveira & Fernandes 2009)."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "Vince Gonzalez" }]
|
|
13
|
+
keywords = ["tritanopia", "tritan", "colorblind", "color-blindness", "cvd", "simulate", "color-vision", "accessibility", "a11y"]
|
|
14
|
+
dependencies = ["cvdsim>=0.1.0"]
|
|
15
|
+
|
|
16
|
+
[project.optional-dependencies]
|
|
17
|
+
image = ["cvdsim[image]>=0.1.0"]
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Homepage = "https://opticquiz.com/"
|
|
21
|
+
Source = "https://github.com/vince-gonzalez/opticquiz.com"
|
|
22
|
+
|
|
23
|
+
[tool.setuptools]
|
|
24
|
+
packages = ["tritanopia"]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""tritanopia — simulate tritanopia (blue-yellow) color vision.
|
|
2
|
+
|
|
3
|
+
A one-type shortcut over cvdsim: every call is cvdsim's with the deficiency fixed to "tritan".
|
|
4
|
+
No colorimetry is reimplemented here.
|
|
5
|
+
|
|
6
|
+
import tritanopia
|
|
7
|
+
tritanopia.simulate("#d7191c") # that color as tritanopia sees it
|
|
8
|
+
from PIL import Image
|
|
9
|
+
tritanopia.simulate_image(Image.open("chart.png")).save("chart-tritan.png")
|
|
10
|
+
"""
|
|
11
|
+
import cvdsim
|
|
12
|
+
|
|
13
|
+
__version__ = "0.1.0"
|
|
14
|
+
TYPE = "tritan"
|
|
15
|
+
__all__ = ["simulate", "simulate_image", "TYPE"]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def simulate(color, severity=1.0):
|
|
19
|
+
return cvdsim.simulate(color, TYPE, severity)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def simulate_image(image, severity=1.0):
|
|
23
|
+
return cvdsim.simulate_image(image, TYPE, severity)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tritanopia
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Simulate tritanopia (blue-yellow) color vision — a typed shortcut over cvdsim / the OpticQuiz engine (Machado, Oliveira & Fernandes 2009).
|
|
5
|
+
Author: Vince Gonzalez
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://opticquiz.com/
|
|
8
|
+
Project-URL: Source, https://github.com/vince-gonzalez/opticquiz.com
|
|
9
|
+
Keywords: tritanopia,tritan,colorblind,color-blindness,cvd,simulate,color-vision,accessibility,a11y
|
|
10
|
+
Requires-Python: >=3.8
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: cvdsim>=0.1.0
|
|
14
|
+
Provides-Extra: image
|
|
15
|
+
Requires-Dist: cvdsim[image]>=0.1.0; extra == "image"
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# tritanopia
|
|
19
|
+
|
|
20
|
+
Simulate **tritanopia** (blue-yellow) color vision — the color, or a whole image, as a tritanopia viewer sees it.
|
|
21
|
+
A typed shortcut over [`cvdsim`](https://pypi.org/project/cvdsim/): every call is `cvdsim`'s with
|
|
22
|
+
the deficiency fixed to `tritan`.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install tritanopia # color only
|
|
26
|
+
pip install "tritanopia[image]" # + image recoloring
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
import tritanopia
|
|
31
|
+
tritanopia.simulate("#d7191c") # that red as tritanopia sees it
|
|
32
|
+
from PIL import Image
|
|
33
|
+
tritanopia.simulate_image(Image.open("chart.png")).save("chart-tritan.png")
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- **`simulate(color, severity=1.0)`** → hex, as tritanopia sees it.
|
|
37
|
+
- **`simulate_image(image, severity=1.0)`** → a recolored PIL Image (path or Image in).
|
|
38
|
+
|
|
39
|
+
Built on the published method: https://doi.org/10.5281/zenodo.21310578 · Screening/design aid, not a clinical tool.
|
|
40
|
+
|
|
41
|
+
## Licence
|
|
42
|
+
MIT.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tritanopia
|