Test foreground and background colors for readability quickly. See WCAG grades, ratios, and luminance details. Export results, compare palettes, and meet accessibility targets today.
This calculator uses WCAG relative luminance and contrast ratio:
Linearization converts sRGB to light intensity using the WCAG piecewise transform before computing luminance.
| Foreground | Background | Contrast Ratio | AA Normal | AAA Normal |
|---|---|---|---|---|
| #111827 | #ffffff | 17.74 | Pass | Pass |
| #6b7280 | #ffffff | 4.83 | Pass | Fail |
| #ffffff | #0f172a | 17.85 | Pass | Pass |
| #0ea5e9 | #082f49 | 5.01 | Pass | Fail |
| #22c55e | #052e16 | 6.54 | Pass | Fail |
Analytics screens pack tables, charts, and tiny labels into limited space, so weak contrast quickly turns into missed actionable signals. When axis ticks fade, users misread trends and spend longer scanning for context. In operational dashboards, slower recognition can delay alerts, increasing incident cost. Strong contrast improves legibility for low vision, aging eyes, and bright-room viewing. Consistent contrast also reduces cognitive load during repeated comparison tasks.
The tool converts each channel from sRGB into linear light before combining them into relative luminance. Green receives the largest weight because human perception is most sensitive there. After luminance is calculated for both colors, the contrast ratio is computed as (L1 + 0.05) / (L2 + 0.05). The 0.05 term prevents division extremes and models low-light perception. This approach compares perceived brightness rather than raw RGB values.
Results map the ratio to common WCAG targets so teams can decide the right bar for each component. For normal text, AA needs 4.5:1 and AAA needs 7:1, which usually covers body copy and dense tables. Large text uses lower thresholds because thicker strokes remain readable at smaller ratios. Always consider the smallest font in the component, not just the headline. Use higher targets for controls that gate navigation, like filters.
Start with stable neutrals for surfaces, then define accessible text colors for primary, secondary, and disabled states. If a brand hue fails on white, shift its lightness for text or restrict it to accents and data marks. Verify hover, selected, and error backgrounds, because state overlays often reduce contrast unexpectedly. Document approved pairs as tokens so future screens inherit compliant defaults. In charts, keep gridlines subtle yet still distinguishable from canvas.
Treat contrast as a measurable requirement during design reviews, implementation, and QA, not a last-minute audit. Store your chosen pairs with component names, target ratios, and example sizes. Export reports for stakeholders and keep exceptions time-boxed with owners. When data visualization libraries change themes, re-check contrast to avoid regressions across releases. Schedule reviews for new product areas and templates.
Use AA as the minimum for standard text, and prefer AAA for tables, filters, and critical KPIs when practical, especially on light surfaces.
Yes. Large text has lower required ratios. This page shows both grades and highlights the recommended check based on your size and weight.
Displays vary by calibration, brightness, and ambient light. Rely on the numeric ratio for consistency, then spot-check on representative screens.
Yes, but thin strokes often need higher contrast. Aim for AAA when possible and avoid very light tints on white or light gray backgrounds.
It is a brightness value calculated from linearized red, green, and blue components, weighted to reflect human visual sensitivity.
Adjust lightness for text, reserve the hue for accents, or pair it with an accessible text color. Save approved pairs as reusable design tokens.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.