DESIGN TOOLS

Color Contrast Checker and CSS Colors

Calculate text and background contrast against WCAG 2.2 text requirements. Preview the pairing and copy HEX, RGB and CSS values.

Free · No sign-up · Processed on your device

BUILD YOUR PAIR

Choose your two colors

Supports opaque sRGB HEX colors.

YOUR COLOR STORY

Readable colors
make the message clear.

This text uses your selected foreground and background colors. Check whether small text is comfortable to read too.

Button appearance example

Your chosen colors may make this preview difficult to read.

Preparing the tool…

COLOR NOTE

Three things to check in a color pairing

01 / LUMINANCE

Different hues can still be hard to read

Contrast compares the relative luminance of two colors. Different hues with similar brightness can make text difficult to distinguish from its background. This tool linearizes sRGB channels before calculating luminance.

02 / TEXT SIZE

Distinguish normal and large text

WCAG AA requires 4.5 : 1 for normal text and 3 : 1 for large text. Large text generally means at least 18 pt, or 14 pt when bold, with equivalent sizes considered for scripts such as Korean.

03 / ACTUAL USE

Read the text after checking the numbers

Thin fonts, background images and interactive states are not fully represented by two solid colors. Check the intended font and size. Pair color with text or symbols when communicating success or failure.

Calculation reference: W3C WCAG 2.2: Understanding text contrast. AAA uses 7 : 1 for normal text and 4.5 : 1 for large text.

Frequently asked questions

Does 4.499 pass if it looks close to 4.5?

No. Thresholds are evaluated using the unrounded ratio. The display shows three decimal places, but rounding never turns a failing combination into a pass.

Can I use short HEX codes such as #ABC?

Three-digit HEX repeats each digit to form six digits: #ABC becomes #AABBCC. Uppercase and lowercase are accepted. Results include RGB values and CSS you can copy.

Does this check transparency or gradients?

This version checks two opaque solid colors only. Transparent colors need to be composited with their actual background first. Gradients and photos require checking the background behind each text position. HEX codes with alpha values are not accepted.

How is the suggested text color selected?

The tool compares black and white against the current background and suggests whichever has higher contrast. It does not preserve your original hue, and the suggestion is applied only when you click the button.

Can I use the same result for icons and borders?

Essential non-text elements have separate requirements and exceptions. The AA and AAA labels here apply to text. For input borders and icons, check WCAG non-text contrast guidance and the actual adjacent colors.

Does this confirm that my whole site is accessible?

Text contrast is one part of accessibility. This color calculation does not test keyboard access, accessible names, labels, zoom or error messages. Do not use it as certification or a guarantee for an entire site.