Color is used for various reasons: to add interest, to emphasize content and to de-emphasize it.
However, per Section 508, color cannot be the only way to communicate information. It is not sufficient to change the color of "Important!" to red; the content itself should also convey this information.
There are many types of color blindness. It is not limited to the inability to see the color red or green. Often the contrast between colors can interfere with readability and, therefore, accessibility.
WCAG 2.1 requires a 4.5:1 ratio between colors; 3:1 for large text. However, WCAG 3.0 recommends a contrast ratio of 7:1.
Your color choices should comply with WCAG 2.1 at a minimum; ideally the contrast will be as high as WCAG 3.0 recommendations.
Color and contrast testing tools
- Instant Eyedropper to capture the color's hex code
- Color Contrast Checker by WebAIM