Skip to main content

achromatopsia

Simulate total color blindness (achromatopsia / complete monochromacy) — the world in pure luminance. A color, or a whole image, collapsed to the gray of the same brightness.

pip install achromatopsia
import "achromatopsia"
achromatopsia.simulate("#d7191c");            // "#7f7f7f" — the equiluminant gray
const png = achromatopsia.simulateImage("./chart.png");
require("fs").writeFileSync("chart-gray.png", png);
  • simulate(color) → the gray hex of the same WCAG relative luminance.
  • simulateImage(input, opts?) → a grayscale PNG Buffer (PNG/JPEG in; path, Buffer, or data URI). opts.maxSide caps the longest side (default 2000).

Luminance is opticquiz-cvd's relLuminance, re-encoded to sRGB gray. This is the total-monochromacy end; for the dichromacies see dichromacy. A simulation, not a diagnosis.

Licence

MIT.

Metadata

Release files for achromatopsia 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 achromatopsia 0.1.0
File Size Uploaded Provenance Actions
achromatopsia-0.1.0.tar.gz 3.6 kB Without provenance Details for achromatopsia-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 7.6 kB

Release files / achromatopsia-0.1.0.tar.gz

Download URL achromatopsia-0.1.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
33401f21d63d5adb4ba08a101911dcb4b12ccbac37f48c18d6a472944c85f5f4
BLAKE2b-256 checksum
How to use checksums
bc61b17e732b9d429848f6edf5dee2338ada65f0b90deee453377911c65a9737
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL achromatopsia-0.1.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc4035e79052666656cc425d4769a939994e072a749adc1eeb0e3e7b5409fd74
BLAKE2b-256 checksum
How to use checksums
653cd50d91a6d9e2c9fdf02519df49329be5d2e43f4bbe610cd9b3a9f2bdf602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for achromatopsia 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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