WCAG Contrast Checker Online
Related tools
Validators and utilities that complement WCAG Contrast Checker Online — same session, no sign-up.
Free WCAG 2.x contrast checker: paste two hex colors and get the contrast ratio with AA/AAA guidance using sRGB relative luminance.
#RGB or #RRGGBB only — WCAG 2.x contrast ratio for sRGB hex pairs.
How to use this tool
- Paste foreground and background colors as #RGB or #RRGGBB.
- Read the contrast ratio and AA/AAA hints for normal and large text.
- Adjust colors until the ratio meets your target level, then re-check.
What this check helps you catch
- Contrast ratio from sRGB relative luminance
- Heuristic AA/AAA guidance for text sizes
- Hex-only input (not full CSS color functions)
FAQ
- How do I check WCAG color contrast online?
- Paste two hex colors. The tool computes the WCAG 2.x contrast ratio and shows AA/AAA-oriented hints so you can fix low-contrast UI text.
- What contrast ratio do I need for AA?
- For normal text, WCAG 2.x Level AA generally expects at least 4.5:1 (3:1 for large text). AAA is stricter (7:1 / 4.5:1). Always confirm against your exact success criterion.
- Does this replace a full accessibility audit?
- No. Contrast is one signal. Keyboard access, semantics, and screen-reader flows still need separate review.
- Where is the accessibility tools hub?
- Start at /accessibility-tools for WCAG contrast and related validators.
The WCAG Contrast Checker helps you evaluate the contrast ratio between two hex colors using sRGB luminance, so you can quickly assess whether text, icons, and interface elements are likely to meet accessibility expectations. Designers, developers, QA teams, and content editors use contrast checks to reduce readability issues and improve usability for people with low vision or color-vision differences. This tool is especially useful during UI design, design system reviews, and front-end implementation when color choices need to be validated against WCAG contrast guidance.
How This Validator Works
This checker compares two hexadecimal color values by converting them into relative luminance values in the sRGB color space. It then calculates the contrast ratio between the foreground and background colors. The result is a numeric ratio that can be compared against WCAG contrast thresholds for normal text, large text, and non-text UI components.
- Accepts two hex color values, such as foreground and background colors
- Converts each color from hex to sRGB
- Calculates relative luminance for each color
- Computes the contrast ratio between the two values
- Helps you judge readability and accessibility risk
Common Validation Errors
- Invalid hex format, such as missing characters or unsupported symbols
- Using shorthand and full hex values inconsistently without proper parsing
- Choosing colors with insufficient contrast for body text
- Assuming contrast is acceptable without checking actual ratio values
- Testing only in one theme, such as light mode, and missing dark mode issues
- Relying on color alone to communicate meaning in the interface
Where This Validator Is Commonly Used
- Design systems and component libraries
- Accessibility reviews for websites and web apps
- UI and product design workflows
- Front-end development and implementation QA
- Content management and editorial publishing checks
- Dark mode and theme testing
- Brand color selection and visual identity review
Why Validation Matters
Color contrast affects how easily users can read text and distinguish interface elements. Validating contrast early helps teams catch accessibility problems before release, reducing rework and improving the experience for users with visual impairments or low-quality display conditions. It also supports more consistent design decisions across products, themes, and components.
Contrast validation is not only about compliance; it is also about clarity, usability, and inclusive design. A color pair that looks attractive in a mockup may still be difficult to read in real-world conditions, especially on mobile screens, in bright light, or for users with reduced vision.
Technical Details
- Input type: two hex color values
- Color model: sRGB
- Calculation basis: relative luminance
- Output: contrast ratio between foreground and background colors
- Primary use case: accessibility and readability assessment
| Check Type | What It Measures | Typical Use |
|---|---|---|
| Text contrast | Readability of foreground text against background | Body copy, labels, buttons |
| UI contrast | Visibility of interface elements | Icons, borders, controls |
| Theme contrast | Color pairing across light and dark modes | Design systems, app themes |
FAQ
What does the WCAG Contrast Checker measure?
It measures the contrast ratio between two hex colors using sRGB luminance. This helps determine whether a foreground and background color pair is likely to provide enough visual distinction for readable text or visible interface elements. The result is a ratio that can be compared with WCAG contrast guidance.
Does this tool guarantee WCAG compliance?
No. A contrast ratio is an important part of accessibility review, but it does not guarantee full WCAG compliance. Other factors matter too, including font size, font weight, text placement, and whether color is the only way information is conveyed. Use the result as one input in a broader accessibility check.
Can I use this for icons and UI components?
Yes. Contrast is relevant not only for text but also for icons, borders, controls, and other non-text elements. While the exact accessibility requirements may differ depending on the element and context, checking color contrast is still a useful step for improving visibility and usability.
Why do hex colors need to be converted to sRGB luminance?
Hex values are just a color encoding format. To compare contrast accurately, the colors must be converted into a luminance-based model. sRGB luminance provides a standardized way to estimate how bright a color appears relative to another color, which is the basis for contrast ratio calculations.
What is a good contrast ratio for text?
That depends on the text size and the accessibility target you are using. In general, higher contrast improves readability. Many teams use WCAG thresholds as a baseline for normal text, large text, and UI components, then review the result in the context of the actual design and user environment.
Why can a color pair look fine but still fail contrast checks?
Human perception is influenced by surrounding colors, display brightness, and personal vision differences. A pair may appear acceptable in a design mockup but still produce a low contrast ratio when measured objectively. That is why automated contrast checking is useful during design and development.
Should I test both light mode and dark mode?
Yes. A color pair that works well in one theme may fail in another. Testing both light and dark modes helps catch readability problems across different interface states, especially in products that support theme switching or system-based appearance settings.
Is contrast the same as accessibility?
No. Contrast is one part of accessibility, but not the whole picture. Accessible design also includes keyboard navigation, semantic HTML, focus states, labels, alternative text, and clear interaction patterns. Contrast checking is a practical and important step, but it should be used alongside other accessibility reviews.
Related Validators & Checkers
- Color Validator — checks color values and formatting
- CSS Validator — helps verify stylesheet syntax and structure
- HTML Validator — checks markup quality and document structure
- Accessibility Checker — broader review of usability and WCAG-related issues