Glyph WidgetsGlyph Widgets
AboutContactPrivacyTermsSupport on Ko-fi

© 2026 Glyph Widgets. All rights reserved.

·

100% Client-Side Processing

Contrast Checker

Last updated: March 6, 2026

Check the contrast ratio between two colors to ensure WCAG 2.1 accessibility compliance. Test for AA and AAA levels for both normal and large text with real-time preview.

Features

  • ▶WCAG 2.1 contrast ratio calculation
  • ▶AA and AAA compliance checking
  • ▶Normal and large text thresholds
  • ▶Real-time preview with sample text
  • ▶Copy contrast ratio to clipboard
  • ▶Works offline after loading

How to Use This Tool

1

Select Foreground Color

Enter or pick your text/foreground color using the color picker or by typing a HEX value. This is typically your text color.

2

Select Background Color

Enter or pick your background color. Use the swap button to quickly reverse foreground and background if needed.

3

Review Results

Check the contrast ratio and WCAG compliance badges. Green badges indicate passing, red indicates failing. Aim for at least AA compliance for all text.

4

Preview Your Design

Use the preview section to see how your color combination looks with actual text at different sizes before implementing it in your design.

WCAG Accessibility Standards

WCAG (Web Content Accessibility Guidelines) defines contrast requirements to ensure content is readable by people with visual impairments. Level AA requires 4.5:1 for normal text and 3:1 for large text. Level AAA requires 7:1 and 4.5:1 respectively.

Relative Luminance Formula

Relative luminance measures the perceived brightness of a color using the formula: L = 0.2126R + 0.7152G + 0.0722B. The coefficients reflect human eye sensitivity, with green being most prominent. Values are linearized from sRGB before calculation.

Contrast Ratio Calculation

The contrast ratio formula is: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color's luminance and L2 is the darker color's. The 0.05 offset prevents division by zero and accounts for ambient light.

Large vs Normal Text

Large text is defined as 18pt (24px) regular weight or 14pt (18.5px) bold. Large text has lower contrast requirements because its increased size makes it naturally more readable, even with less contrast.

Why Contrast Matters

Approximately 8% of men and 0.5% of women have color vision deficiency. Low contrast text is also difficult to read for elderly users, in bright sunlight, or on low-quality displays. Good contrast benefits everyone.

Frequently Asked Questions

A contrast ratio measures the difference in luminance (brightness) between two colors. It ranges from 1:1 (no contrast, same color) to 21:1 (maximum contrast, black on white). Higher ratios mean better readability and accessibility.

Related Tools

Color Picker

Pick colors from screen

Color Converter

Convert between formats

Palette Generator

Generate color palettes

#000000
#FFFFFF

Preview

Sample Heading Text

This is regular paragraph text. Good contrast ensures readability for all users, including those with visual impairments.

This is small text that requires even better contrast for readability.

Contrast Ratio

21.00:1
Normal AA≥ 4.5:1
Normal AAA≥ 7:1
Large AA≥ 3:1
Large AAA≥ 4.5:1
Share

WCAG Quick Reference

Level AA (Minimum)4.5:1 normal, 3:1 large
Level AAA (Enhanced)7:1 normal, 4.5:1 large
Large Text18pt+ regular or 14pt+ bold

Accessible Color Pairs

Click any pair to use it as your foreground/background colors

Saved Presets is a Supporter feature.

Tool History is a Supporter feature.

Tool Notes is a Supporter feature.