Part of Media tools: See all Media tools.
What is Color Contrast Checker?
Check WCAG color contrast ratios for text accessibility. Enter a foreground (text) color and background color to see if the combination meets WCAG AA or AAA standards. Essential for designers and developers building accessible websites and apps. Supports hex colors and live preview.
How to use Color Contrast Checker
- Pick or enter a foreground (text) color and background color using the color picker or hex input.
- View the live sample text to see how the combination looks.
- Read the contrast ratio and WCAG pass/fail for AA Normal, AA Large, AAA Normal, and AAA Large.
Why use this tool?
Color contrast checker WCAG helps ensure text is readable for users with low vision or color blindness. AA requires 4.5:1 for normal text and 3:1 for large text; AAA requires 7:1 and 4.5:1. Many users search for 'accessibility contrast checker' or 'WCAG color contrast'. Our tool runs in your browser—no data is sent. Free accessibility tools help designers meet ADA and Section 508 requirements.
FAQ
- What is WCAG?
- Web Content Accessibility Guidelines. WCAG defines contrast ratios for readable text. AA is the common target; AAA is stricter.
- What ratio do I need?
- AA: 4.5:1 for normal text, 3:1 for large (18px+ or 14px+ bold). AAA: 7:1 and 4.5:1 respectively.
- Is this tool free?
- Yes. Free with no signup required.
- Does it work with dark mode?
- Yes. Test any foreground/background pair—light on dark or dark on light.
- What hex format is supported?
- Use #RGB (e.g. #f00) or #RRGGBB (e.g. #ff0000). We parse both.
Color Contrast Checker — In-Depth Guide
Color contrast checking ensures that text is readable against its background color. Web Content Accessibility Guidelines require minimum contrast ratios of four point five to one for normal text and three to one for large text. This tool calculates the exact ratio between any foreground and background color pair and reports whether it meets accessibility standards.
Web designers and developers use contrast checkers during the design phase to ensure their color palettes are accessible to users with visual impairments. Approximately eight percent of men and half a percent of women have some form of color vision deficiency. Meeting contrast guidelines ensures your content is readable by the widest possible audience.
Accessibility auditors rely on contrast checking tools when evaluating websites for compliance with WCAG guidelines and legal requirements like the ADA or Section 508. Documenting contrast ratios for key text elements provides evidence of compliance during audits. This tool generates clear pass or fail results against both AA and AAA conformance levels.
Tip: test contrast for all text sizes on your site, not just body copy. Navigation links, button labels, placeholder text, and error messages all need sufficient contrast. Dark mode designs need separate contrast verification. When a color pair fails, try adjusting lightness rather than hue to improve contrast while maintaining your color scheme's overall aesthetic.
Why contrast ratio matters before you ship UI
Low-contrast text is one of the most common accessibility failures on the web. A label that looks “fine” on your calibrated monitor can disappear for someone on a bright phone screen, with older eyes, or with low vision. WCAG 2.1 does not ask you to guess. It defines a numeric contrast ratio between the relative luminance of text (or essential icons) and the background behind them, then sets pass thresholds for normal text, large text, and enhanced (AAA) targets.
This page is a small browser tool for that check. Pick a foreground colour and a background colour with the colour inputs, or type hex values such as #1a1a1a and #ffffff. The preview updates live. The ratio is shown as N.NN:1, and four WCAG rows mark pass or fail for AA Normal, AA Large, AAA Normal, and AAA Large. The maths runs entirely in your tab. There is no upload field and no /api/color-contrast-checker endpoint; a request to that path returns 404. Close the tab and the colours are gone.
What the checker actually computes
The tool follows the WCAG 2 relative-luminance and contrast-ratio formulas used for Success Criterion 1.4.3 (Contrast Minimum) and 1.4.6 (Contrast Enhanced). Each sRGB channel is normalised to 0–1, linearised with the standard piecewise gamma (divide by 12.92 below 0.03928, otherwise raise ((c + 0.055) / 1.055) to 2.4), then combined as 0.2126·R + 0.7152·G + 0.0722·B. The contrast ratio is (L1 + 0.05) / (L2 + 0.05) where L1 is the lighter luminance and L2 the darker. That is the same definition browsers and most design-system checkers use for WCAG 2.x.
Pass marks on this page are fixed thresholds from the specification:
AA Normal needs at least 4.5:1 (body copy and UI text under the large-text size rules).
AA Large needs at least 3:1 (text that is at least 18pt / 24px regular, or 14pt / 18.66px bold — WCAG’s “large text”).
AAA Normal needs at least 7:1.
AAA Large needs at least 4.5:1.
The tool does not measure your font size. It reports whether the colour pair would meet each threshold if the text were normal or large. You still decide which row applies to the element you are designing. Many teams treat AA Normal as the default bar for body UI and reserve AAA for long-form reading experiences or regulated content.
How to use the controls
Foreground is the text (or icon) colour. Background is the surface behind it. Each side has a native colour picker and a hex text field. Changing the picker writes the hex field; typing a valid 3-digit or 6-digit hex (with or without #) drives the preview. Invalid hex clears the ratio to an em dash until both sides parse again. Defaults are black text on white. The sample preview block uses the same pair so you can spot-check readability while you tune values.
Only solid sRGB hex colours are accepted. Named CSS colours, rgb(), hsl(), 8-digit hex with alpha, and Display-P3 values are not parsed. If your design token is in another format, convert it to 6-digit hex first, then paste it here. Three-digit shorthand such as #abc is expanded to #aabbcc the same way CSS does.
Reading the four pass / fail rows
A green check means the computed ratio meets or exceeds that row’s threshold. A cross means it does not. AA Normal failing while AA Large passes is common for mid-grey captions that only work when the type is large and bold. AAA Normal is intentionally strict: many brand primary colours on white fail AAA even when they pass AA. That is not a bug in the tool; it is the specification. If your product only claims AA conformance, treat the AAA rows as optional stretch goals rather than blockers.
Swap foreground and background when you test inverted themes. Dark-mode “muted” labels often look elegant in a mock and then fail AA Normal against a charcoal surface. Checking both directions of a pair (for example primary-on-surface and surface-on-primary for badges) catches surprises that a single mockup colour never shows.
What this tool does not do
Be clear about the scope. It checks one foreground against one background for WCAG 2 contrast. It does not evaluate gradients, images, shadows, or text over a photo. It does not implement APCA / WCAG 3 candidate algorithms. It does not simulate colour blindness, measure non-text contrast for UI components (SC 1.4.11), or crawl your live site. It does not replace a full accessibility audit. Those limits keep the page honest and private: a site crawler or screenshot sampler would need to fetch pages or upload assets; this checker never leaves the browser.
Semi-transparent text over a busy background is also outside the model. WCAG contrast for opaque colours is well defined; alpha-blended text requires compositing the effective colours first. Composite manually (or in your design tool), then paste the resulting opaque hex pair here. Placeholder “lorem” previews also cannot prove focus-ring or disabled-state contrast — those need their own pairs.
Practical jobs this page is built for
Design tokens. Paste brand primary and surface colours before they land in CSS variables. Catch a soft grey on white that fails AA while it still looks stylish in a design file.
Dark mode pairs. Check light text on near-black surfaces and muted secondary labels separately — secondary text often fails first.
Buttons and links. Test label colour against the button fill, and separately test the fill against the page background if the control must meet non-text contrast elsewhere in your process.
Quick QA. When a ticket says a caption is hard to read, measure the pair in seconds instead of debating screenshots.
Documentation. Record the ratio next to a token name so future theme changes do not silently regress AA.
A useful habit: keep a short table of “approved pairs” (token name, hex, ratio, AA/AAA status) next to your theme file. Re-run this page whenever someone lightens a grey “to make it softer.” Softness is often just lower contrast.
Privacy: colours stay in the browser
Brand palettes and unreleased UI colours are sensitive. This tool does not post them. Luminance and ratio run in page JavaScript from the hex you typed. There is no account and no server conversion step. The page is free and needs no signup. Claims on this page match the controls you see: two colours, a live preview, a ratio, and four WCAG pass/fail rows derived from the WCAG 2 luminance formula.
Related tools on this site
When you are building a palette rather than checking one pair, open the Color Picker to sample and refine hex values, then return here to verify contrast. For layout sizing that often sits next to accessible type, use the Aspect Ratio Calculator. For favicon and small UI bitmap work after colours are locked, use PNG to ICO. For reading or previewing documentation that mentions contrast requirements, use Markdown Preview. Those pages are on the same indexed keep-list cluster and also run in the browser where the job allows.
Pick the pair, read the ratio, match the threshold your product targets, then lock the token. A thirty-second check here is cheaper than a retrofit after launch.
Also try
Related tools that work well with this one: