Catalog PyPI
PACKAGE EXPLORERView in registry

achromatopsia

PyPI

Simulate total color blindness (achromatopsia / complete monochromacy) — collapse a color or image to WCAG luminance.

Versions collected1
Direct dependencies3From release 0.1.0
Last observed20 Oct, 18:13 UTC

README

Version 0.1.0 documentation

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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.04 Sept 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
vince-gonzalez/opticquiz.com

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:13 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:ed5da7254e6cd5150ef443b8bf72c0c4b8ff2cb98e24173d6a9aecf867d613b6