Skip to content
Projects

siege-media/contrast-ratio has 2,436 GitHub stars and 209 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-11 09:58 UTC. Last push 2024-05-08.

How these counts are measured

A tool to calculate the contrast ratio between any two valid CSS colors.

Measured star growth

in 24h
0
in 7 days
0
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Logo

Contrast Ratio

Official version

A tool to calculate the WCAG (Web Content Accessibility Guidelines) contrast ratio of text on a web page.

WCAG define two levels of compliance that differ only in the contrast ratio:

Level AA:

  • 4.5:1 for normal text
  • 3:1 for large text
  • 3:1 for graphics and user interface components (such as form input borders) Level AAA:
  • 7:1 for normal text
  • 4.5:1 for large text

Large text is defined as 14 point (typically 18.66px, or 1.2rem when the root font is 16px) and bold or larger, or 18 point (typically 24px or 1.5rem) or larger.

NOTE: this repo does not create the public website any longer. The code is used as the basis for the page at Siege Media.

Acknowledgements

Explore related projects