# siege-media/contrast-ratio

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

Repository: https://github.com/siege-media/contrast-ratio
Canonical: https://ross.abutalabs.com/products/contrast-ratio
Homepage: https://www.siegemedia.com/contrast-ratio
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2024-05-08T14:54:20+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5072, "days_push": 847, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2437, forks 210 (observed 2026-08-28T04:06:51.480932+00:00)

## What it is
A web-based tool that calculates the WCAG contrast ratio between two CSS colors to check text readability compliance. Originally created by Lea Verou and now maintained by Siege Media as the basis for their hosted contrast ratio checker.

## Use cases
- check if my text and background colors pass WCAG AA contrast
- calculate contrast ratio between two hex colors
- find accessible color combinations for website text
- verify color contrast for Lighthouse accessibility audit
- test contrast ratio for large vs normal text
- check semi-transparent background color contrast

## When to choose
- you need a quick visual checker for WCAG color contrast compliance
- you want to test arbitrary CSS color formats including alpha transparency
- you need a free browser-based tool without installation

## When to avoid
- you need automated accessibility scanning of a whole website
- you need programmatic contrast calculation in your build pipeline
- you need to audit contrast beyond color pairs (e.g., full page audits)

## Facets
- artifact type: application
- maturity: maintenance
- function: accessibility, ui-components
- domain: accessibility, web-design, frontend
- platform: browser
- tags: wcag, color-contrast, css-colors, checker-tool, color, web

## Member repositories
- siege-media/contrast-ratio (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:51.480932+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:31:00.734415+00:00, confidence not recorded.
  - readme: https://github.com/siege-media/contrast-ratio (fetched 2026-08-28T04:06:51.480932+00:00, sha 44a77c2a1086)
  - homepage: https://www.siegemedia.com/contrast-ratio (fetched 2026-08-29T10:12:36.753343+00:00, sha 37fea6ee50d7)
  - site_page: https://www.siegemedia.com/about (fetched 2026-08-29T10:12:36.762569+00:00, sha 2d385d48685b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
