Color Contrast

screenshot of a webpage with acceptable color contrast
Figure 1: Example of webpage where color contrast of elements pass the criteria

Colors are generally used to enhance the aesthetic appeal of websites and convey information. It is essential to use colors that have good contrast.

NOTE:

  • New to accessibility or uncertain of requirements, it will be helpful to review all sections below.
  • Already familiar with requirements, skip to the “Working Example” section for sample HTML, CSS and JavaScript (when needed), along with a working demo.