๐ŸŒ“

Color Contrast Calculator

Check WCAG 2.2 contrast for normal text, large text, and essential graphics. Preview solid or transparent HEX colors before using them.

Practical Guide
Colors

#RGB ยท #RGBA ยท #RRGGBB ยท #RRGGBBAA

Transparent colors are composited over a white backdrop.

Preview
Account settings

Update your contact details and notification preferences.

Contrast results
Contrast ratio
19.79:1
Relative luminance
Foreground
0.003
Background
1.000
CriterionMinimumResult
AA ยท normal text4.5:1Pass
AAA ยท normal text7.0:1Pass
AA ยท large text3.0:1Pass
AAA ยท large text4.5:1Pass
AA ยท essential graphics3.0:1Pass

โ“What is a color contrast ratio?

It compares the relative luminance of two colors. Check the actual text and background colors together when choosing accessible combinations.

โœจFeatures

๐ŸŽจ

HEX with alpha

Check short or long HEX values and layer transparent colors over white.
๐Ÿ“Š

WCAG 2.2 results

Compare the ratio with AA and AAA text thresholds and the AA threshold for essential graphics.
๐Ÿ‘๏ธ

Live preview

Read a heading and sample paragraph using the colors you entered.

๐ŸŽฏUse Cases

Design tokens

Compare text and surface token pairs before adding them to a design system.

Interface states

Check icon or outline contrast against adjacent colors in a chosen button or input state.

๐Ÿ“šPractical Guide

Relative luminance

The calculation composites the colors before converting sRGB to linear light. Pass or fail uses the full ratio before display rounding.

CSS HEX notation

Four- and eight-digit HEX notation places opacity in the final digit or pair.

๐Ÿ’ฌFrequently Asked Questions

โ“What counts as large text?
WCAG generally uses at least 18 pt (24 CSS px) at regular weight or 14 pt (about 18.67 CSS px) in bold.
๐Ÿ’ฌHow do I test text on a photo or gradient?
Check the colors immediately behind the text, including the area with the weakest contrast. This tool evaluates one color pair at a time.

๐Ÿ’กHow To & Tips

1๏ธโƒฃ

Enter both colors

Type the text and background colors or use the pickers. Load the sample to test transparent black on white.
2๏ธโƒฃ

Check the result

Use the row for your text size or essential graphic. Swap the colors to test the reverse arrangement.

๐Ÿ“Update Log

๐Ÿ“Œv1.1.261128
v1.1.261128

Added transparent HEX colors, input validation, and a matching preview with a sample pair.

v1.0.0

Initial release with WCAG table, luminance readout, and live preview card.

๐Ÿ“ฆRecommended Components

User Comments

0 / 2000
Loading...