Good colour contrast ensures content is readable and understandable for everyone. It takes into account differences in how people see, as well as how devices or environmental factors can affect vision.
Consider if there is enough contrast between the text and the background. Light colours on white backgrounds may look nice, but can make text difficult to read. To meet accessibility requirements, the contrast ratio between text and background must be at least:
Measure the contrast between text and background colours using a tool like WebAIM’s Colour Contrast Checker.
Colour contrast also applies to icons, buttons, form fields and other visual elements.
Use text over images sparingly. If you must use text over an image, add a solid background behind the text or apply a dark overlay to ensure sufficient contrast.
Text that's part of a logo does not have a minimum contrast requirement. However, be careful when applying logo colours to other content, as branding colours are often reused for headings, links and buttons.
Do not use colour alone to convey meaning. If you could not see the colour, would you still understand everything the design is communicating? For example, are you using colour alone (such as blue text) to indicate a hyperlink without also underlining it. There must be more than one visual cue. This applies to: