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
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
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
Did this prompt work?
Keep exploring
More like this
Build a Drag-to-Arrange Brand Mood Board with Color, Texture and Type Tiles
A prompt that produces a single HTML mood board of color, texture and type tiles built from CSS and SVG, rearrangeable by mouse, touch and keyboard.
Build a Draggable Color Harmony Wheel With Live UI Preview in One HTML File
A ready-to-paste prompt that builds a draggable canvas color wheel. It plots complementary, triadic and analogous schemes live and previews each one on a mini website mockup.
Build a Live Accessible Color Palette Builder with a WCAG Contrast Matrix
Get a single HTML palette builder that tests every text-on-background pair, shows AA/AAA badges live, and suggests the nearest passing shade for failures.
Build an OKLCH Tint and Shade Scale Generator in a Single HTML File
A ready-to-paste prompt that builds an offline color tool turning one brand color into an even 50–900 OKLCH ramp with contrast badges and CSS or JSON token export.
Build a Button and Form Field States Reference Sheet in a Single HTML File
Get a polished, single-file reference sheet that shows button and text field states side by side, with a live playground and contrast ratios computed from design tokens.
Build a Light/Dark Mode Toggle Demo Page with Smooth Theme Switching
A single HTML page with a polished light/dark theme switch built on CSS custom properties that defaults to the system theme, honors reduced motion, and uses no storage.
- Build a Multi-Step Onboarding Wizard with Stepper and Inline Validation
- Build a Playful Animated 404 Error Page with SVG Art and Site Search
- Build a Responsive Navigation Bar With Mega Menu and Mobile Drawer in HTML
- Build a Responsive Three-Tier Pricing Section with Monthly/Yearly Toggle
- Build a Testimonial and Logo Social-Proof Section in a Single HTML File
- Build an Accessible Modal, Toast and Tooltip Showcase in One HTML File