Check an image for colorblind-safety
checkImageDetect if an image's colors stay distinguishable for colorblind viewers: extracts dominant colors, simulates protanopia/deuteranopia/tritanopia, and flags collapsing pairs.
Instructions
Check whether the colors in an image, chart, screenshot or mockup stay distinguishable for people with color-vision deficiency. Extracts the image's dominant colors, simulates protanopia, deuteranopia and tritanopia, and flags the color pairs that collapse into each other — each with how much of the image's area those colors cover, so a conflict between two large regions ranks above one between two specks. Reads PNG and JPEG. Pass path for a local file, or a base64 dataUri. Set returnSimulated=true to also get back the image as a deuteranope sees it. A screening aid, not a legal (ADA/WCAG) audit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to a local PNG or JPEG file, e.g. ./dashboard.png | |
| dataUri | No | Base64 data URI of the image, if you don't have a file path | |
| maxColors | No | How many dominant colors to extract and test (default 12) | |
| simulateType | No | Which deficiency to render when returnSimulated is set (default deutan) | |
| returnSimulated | No | Also return the image recolored as a deuteranope sees it (default false) |