Build a Color Blindness Simulator That Previews a Palette on a Dashboard Card

A single HTML file that redraws a realistic dashboard card under protanopia, deuteranopia, tritanopia and grayscale and flags color pairs that become hard to tell apart.

The prompt

Prompt
Act as a senior product designer who also writes clean front-end code. Build Hueproof, a color blindness simulator that previews a five-color chart palette on a realistic SaaS dashboard card. Show five panels side by side: typical vision, protanopia, deuteranopia, tritanopia and grayscale. Each panel redraws the same card: a revenue KPI, a six-month stacked bar chart, a legend and three status rows with colored dots. Transform the colors with full-severity Machado 2009 matrices applied in linear RGB, and use relative luminance for grayscale. Rules: 1) Above the panels, show five color pickers with role names and hex codes, four preset palettes including the Okabe-Ito safe set, and a ΔE threshold slider that defaults to 12. Everything re-renders live. 2) For each view, compute CIE76 ΔE in Lab between every pair of simulated colors. Give each panel a badge with its clash count, and list flagged pairs below with both simulated swatches, role names and the ΔE value. 3) Use a responsive grid of panels that works from 360px to 1280px wide. 4) Use a calm neutral page palette, a clear type scale, real sample copy, AA contrast for UI text and visible focus rings. 5) Use no external libraries, fonts or storage, and respect prefers-reduced-motion. Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen

Example: Hueproof, a palette checker for chart colors.

Five color pickers sit at the top. The same dashboard card (KPI, stacked bars, legend, status pills) is redrawn for typical vision, protanopia, deuteranopia, tritanopia and grayscale. Each panel shows a clash badge, and a report below lists every pair under the ΔE threshold. Load Traffic light to see the red/green pairs fail, then switch to Okabe-Ito safe and drag the slider to tighten the test.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Naming the exact Machado matrices and CIE76 ΔE gives the model a concrete, correct algorithm instead of vague CSS filter guesses.
  • Rendering a real dashboard card shows how clashes look in context, not just as isolated swatches.
  • Live pickers, presets and a threshold slider make the tool useful on first load with no setup.

Paste into ChatGPT, Claude or Gemini. Save the returned code as hueproof.html and open it in any browser, or run it in the chat's preview or canvas. Swap in your brand hex codes to test them.

Common edits

  • Change the five role names and sample card copy to match your own product's charts or brand.
  • Add a severity slider that blends each matrix with the identity matrix to simulate anomalous trichromacy.

Prompt details

By
Prompts-GPT editors
Published
How prompts are written and checked

Did this prompt work?

Keep exploring

More in Design