Key Principles for Using Color Accessibly
Don’t Rely on Color Alone to Convey Meaning
Always pair color with a visual indicator to make a meaning clear to all users. For example, when marking a required field, it can be shown in red and have an asterisk (*) as a visual indicator.
Ensure Sufficient Color Contrast
Users must be able to distinguish text from the background. Follow the WCAG 2.1 requirements to ensure color contrast is met.
- Normal text (below 18pt or 14pt bold): Minimum contrast ratio of 4.5:1
- Large text (18pt or 14pt bold and up): Minimum contrast ratio of 3:1
- Non-text elements (ex. icons, graphs): Contrast ratio of 3:1 against adjacent colors
There are many tools to test contrast including:
Consider Different Types of Color Vision Deficiency
Types of color-blindness:
- Red-Green color blindness (protanopia/deuteranopia)
- Blue-yellow color blindness (tritanopia)
- Monochromacy (no color perception)
Use color blindness simulators for testing:
- Coblis - Color Blindness Simulator
- Chrome DevTools > Ctrl + Shift + P to open Rendering tab > Scroll down to Emulate vision deficiencies
Allow Users to Choose Preferred Colors
Support user stylesheets or high contrast modes by:
- Avoiding !important in your CSS
- Using semantic HTML
- Ensure content remains readable with custom themes or OS settings