...
Don’t rely on color to convey critical information such as alerts and error messages. See more info about this under the Alert/Error Messaging section.
Contrast and Non-Text Content
...
Users with partial sight often experience limited color vision.
Some older users may not be able to see color well.
Users who have color-blindness benefit when information conveyed by color is available in other visual ways.
People using limited color monochrome displays may be unable to access color-dependent information.
Users who have problems distinguishing between colors can look or listen for text cues.
Please see more detailed information on how to comply with this guideline.
WCAG Related References
1.3.3 Sensory Characteristics (Level A)
...