Developer Tools
Color Contrast Checker
Calculate WCAG contrast ratios for foreground and background colors in HEX, RGB or HSL.
About this tool
Calculate WCAG contrast ratios for foreground and background colors in HEX, RGB or HSL.
What is it?
This accessibility calculation tool compares relative luminance for a foreground and background color.
How to Check WCAG Color Contrast
Enter foreground and background colors in HEX, RGB or HSL notation, then review the ratio and text-size thresholds.
- Enter the values or text required by the tool.
- Choose an option or calculation mode when one is available.
- Run the tool and review the result panel.
- Copy the result if you need to use it in another application.
Examples
- Black text on white background → 21:1
Common use cases
- Checking text and background color pairs during interface design.
- Comparing a palette against WCAG text contrast thresholds.
- Reviewing foreground and background colors before publishing a theme.
Technical details
- Relative luminance follows the WCAG sRGB transfer function and contrast ratio formula.
- Normal text thresholds are 4.5:1 AA and 7:1 AAA; large text thresholds are 3:1 AA and 4.5:1 AAA.
Related concepts
What Is a Color Contrast Checker?
This accessibility calculation tool compares relative luminance for a foreground and background color.
Frequently Asked Questions
What WCAG thresholds are used?
Normal text uses 4.5:1 for AA and 7:1 for AAA. Large text uses 3:1 for AA and 4.5:1 for AAA.
Does this check all accessibility requirements?
No. It calculates color contrast only and does not audit the rest of a page.
Related Tools
HTML Encoder
Convert &, <, >, double quotes and apostrophes into HTML character references. This encoder is not a sanitizer; XSS safety depends on the output context.
JSON Formatter
Format and organize JSON data for easier reading.
URL Slug Generator
Create lowercase, URL-safe slugs from text with Turkish character normalization.