About this tool
The Color Blindness Simulator accurately replicates human vision deficiencies based on physiological LMS cone matrix projection models (Brettel & Viénot algorithms). It simulates Protanopia (red-blindness), Deuteranopia (green-blindness), Tritanopia (blue-blindness), and Achromatopsia (monochromacy), enabling UI/UX designers and accessibility engineers to preemptively identify visual ambiguities and satisfy W3C WCAG 2.1 conformance criteria.
How to Use This Tool (Step-by-Step)
Select Color or Inspect UI Palette
Input primary brand colors or status tokens (success, warning, error) for accessibility auditing.
Toggle Visual Deficiency Simulations
Observe how colors map under Protanopia, Deuteranopia, and Tritanopia scenarios in real time.
Refactor Ambiguities with Redundant Cues
Augment color states with iconography, patterns, and explicit labels to eliminate single-cue dependencies.
Physiological LMS Matrix Projection
Applies the recognized Viénot conversion matrices to simulate spectral cone receptor collapse on the retina.
Comprehensive Vision Profiling
Models red-green color blindness (affecting ~8% of males), rare tritan defects, and complete monochromatic greyscale.
WCAG 2.1 Conformance Verification
Highlights dangerous collisions where 'Error Red' and 'Success Green' blend into indiscernible khaki shades.
Accessibility Color Design Best Practices
- •Never Rely Exclusively on Color (WCAG 1.4.1): Always pair chromatic state signals with iconography, checkmarks, text prefixes, or underlines.
- •The Classic Red/Green Chart Trap: In analytics dashboards, replace red/green pairings with high-contrast blue/orange palettes which remain starkly distinguishable across all color-deficient users.
- •Leverage Luminance Disparity: When hue perception degrades, human vision relies on value and luminance. Ensure adequate contrast deltas between adjacent interactive elements.
Code & Transformation Examples
Trichromacy vs Deuteranopia Simulation
成功绿色: #22C55E | 危险红色: #EF4444成功状态: #A1A35E (黄褐) | 危险状态: #A89B44 (极相近黄褐)* Under Deuteranopia, red and green collapse into indistinguishable brownish hues requiring secondary cues.
Deuteranopia Simulation Matrix Function
function simulateDeuteranopia(r, g, b) {
const r_sim = 0.625 * r + 0.375 * g;
const g_sim = 0.700 * r + 0.300 * g;
const b_sim = 0.300 * g + 0.700 * b;
return [Math.round(r_sim), Math.round(g_sim), Math.round(b_sim)];
}simulateDeuteranopia(34, 197, 94); // 返回: [95, 83, 125]* Linear channel blending enables instant, physiological-grade offline color space projection.
Frequently Asked Questions
Q: What percentage of the population experiences color blindness?
A: Approximately 8% of males and 0.5% of females have congenital color vision deficiency, primarily red-green variants.
Q: Why do red and green appear as similar muddy tones to color-blind users?
A: Defects in L or M cone photopigments collapse the red-green opposing perceptual channel, leaving only blue-yellow signals to reach the cortex.
Q: How can developers provide an accessible mode for color-deficient users?
A: Developers typically inject high-contrast theme classes, adjust token variables (e.g. blue/orange pairing), and require accompanying text icons for all visual states.