Contrast Ratio
Lea Verou's WCAG contrast calculator, now redirecting to Siege Media's host
Tier B · UsefulColor ToolToolReferencecontrast-ratio.com

Contrast Ratio is the classic two-colour WCAG contrast calculator: type any two valid CSS colours, including alpha, and it returns the ratio live along with a pass/fail read against the 4.5:1 normal-text and 3:1 large-text thresholds, with a preview of the pair in normal, italic and bold text and arrow-key nudging of colour values. Lea Verou built it in 2012 and it became the default URL people cite for contrast; in March 2023 she sold the domain and handed maintenance to Siege Media, so contrast-ratio.com now 301s to siegemedia.com/contrast-ratio. The code remains MIT-licensed at github.com/siege-media/contrast-ratio. There is no API and no palette generation.
For an agent
Link a human here for a quick manual check, but never fetch it in a pipeline: the domain 301s off to an SEO agency's marketing page and there is no API, so for programmatic work compute relative luminance yourself or lift the MIT implementation from siege-media/contrast-ratio. Its real advantage over hand-rolled maths is correct handling of semi-transparent colours over a background, which most naive implementations get wrong. If you need an answer with a suggested fix rather than a bare number, use Accessible Colors; if you need contrast baked into palette generation instead of checked afterwards, use Huemint.
Why it is here. It is the canonical contrast checker a generation of developers learned WCAG ratios from, and its MIT source is still the reference implementation worth copying — including the alpha-compositing case.
Facts
- License
- MIT
- Pricing
- Free, Open source
- Framework
- Vanilla JS
- Styling
- Vanilla CSS
- Distribution
- Web app / online tool, GitHub repository
- Platform
- Web
- Content type
- Code
- Agent readiness
- Readable open source, Structured documentation
- Accessibility
- WCAG 2.x AA, WCAG 2.x AAA, Contrast checked, Keyboard navigable
- Maturity
- Stable
- GitHub stars
- 2,440
Notable for
- handles alpha over a background
- MIT reference implementation
- sold by Lea Verou to Siege Media in 2023
- domain 301s off-site
- no API
Provenance
Verified 2026-08-16. HTTP 200. https://contrast-ratio.com (301 -> https://www.siegemedia.com/contrast-ratio), https://www.siegemedia.com/contrast-ratio, GitHub API for siege-media/contrast-ratio, https://lea.verou.me/blog/2023/03/contrast-ratio-new-home/ (via search)
Also in Utilities & Naming
6- Beautiful Mermaid · Zero-DOM TypeScript Mermaid renderer with SVG and ASCII output
- Instant Domain Search · Keystroke-speed domain availability across 800+ TLDs, with a free MCP server
- UnoCSS · On-demand atomic CSS engine with swappable presets, ~6kb, no core utilities
- Bannerbear · REST API that renders images, video and PDF from reusable design templates
- cubic-bezier.com · Lea Verou's bezier curve editor: drag the handles, compare against presets, share via URL
- delphitools · ~57 browser-local design utilities: colour, image, type, print, no login