Choose accessible colors for text using Chrome DevTools Color Picker contrast ratio score

Tomasz Łakomy
InstructorTomasz Łakomy
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 3 years ago

Choosing right colors for your website is difficult, especially when we want to develop accessible websites. Our goal should be to choose colors that have a high contrast ratio and as such can be easily read by all users, including those with low-vision impairments or color-vision deficiencies.

In this lesson we're going to learn how to use Chrome DevTools Color Picker to choose colors for text which meet the AA and AAA contrast ratio score.

Instructor: [00:00] Choosing colors for a website can be difficult. In this example, we have a website with a greenish kind of background and a gray text, which is honestly difficult to read. We would like ensure that whatever text we're going to put on our page, users can actually read that, even if they suffer from eyesight problems.

[00:16] Luckily, Chrome dev tools are there to help us. If we click on the color, you open up a color picker. You can use it to easily choose a different color. How do we know that our color we've chosen has a proper contrast ratio?

[00:30] To find out, open up this dropdown next to the text "contrast ratio," and you will notice that two more lines appeared on the color picker. Essentially, everything that is above the first line has a poor contrast ratio.

[00:42] This text can be difficult to read. Anything that is below the first line has a double A contrast ratio rating, so it's very accessible. Anything that is below both first and the second line has a triple A accessibility rating.

[00:57] This is a color that you can safely use for text with this background in particular, and you will make sure that your text is accessible for all kinds of users.

egghead
egghead
~ 37 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today