Lessons

Sufficient text contrast

The more contrasting the color of the text and its background, the easier it is to read. The contrast ratio is calculated using a special formula. It takes a value from 0.0 to 21.0.

The color contrast value must be greater than 7 for fonts less than 18 pixels. For shrivts larger than 18 pixels, a factor of 4.5 or more is allowed.

You can calculate the contrast in [this visual calculator](https://colourcontrast.cc /).

The critical problem of text contrast is in the following cases:

  • The block of text is large, more than 50 characters long.
  • The element is navigational and consists of nav or header blocks.
  • The element is a button and has a class containing btn in the name.
Check your website
It's free and will take from 11 to 45 seconds

We use cookies. By continuing to use the site, you agree to the processing of personal data in accordance with privacy policy. I agree