Skip to content

Colour contrast checker

Calculate the WCAG contrast ratio between text and background colours and check AA and AAA levels for normal and large text.

AvailableIn your browserInput: Text

How to use: Colour contrast checker

  1. Enter the text and background colours (HEX, rgb() or hsl()) or pick them.
  2. Read the contrast ratio.
  3. Check AA and AAA for normal text, large text and components.

What it accepts and what you get

Input
Two colours; the background must be opaque.
Output
The contrast ratio and AA/AAA results with a preview.
Where your data is processed
Your data is processed in your browser and is not sent to our servers.

Limitations and notes

  • It uses the WCAG 2.x formula; the ratio is truncated to two decimals and never rounded up.
  • Actual font weight and background images are not considered.

Frequently asked questions

How do I know if my colour contrast is enough?

Enter the text and background colours: you get the contrast ratio and whether it passes AA and AAA for normal text, large text and components.

Which formula does it use and what does it ignore?

It uses the WCAG 2.x formula and truncates the ratio to two decimals, never rounding up. It ignores the real font weight and background images.

When to use it

  • When you choose text and background colours for your website and want them to read well.
  • To check whether you meet the AA or AAA level of the WCAG guidelines.

Examples

Grey on white
#767676 on white gives a little over 4.5:1 and passes AA for normal text; #777777 falls short.
Large text
Large text and components have their own threshold, shown separately.

Common mistakes

  • Using a semi-transparent background: the background must be opaque.
  • Forgetting that it ignores real font weight and background images.

Suggested next steps