uuutil ← all tools

Contrast checker

Enter a text color and a background color — hex, RGB, HSL, or any CSS color, the same conventions as the color converter — or grab them with the screen eyedropper where the browser supports it (elsewhere the swatch opens the native picker). The WCAG 2.x contrast ratio, computed from relative luminance, appears with a pass/fail matrix for AA and AAA at normal and large text sizes, thresholds printed (4.5:1 and 7:1 normal, 3:1 and 4.5:1 large) so you can check the result yourself. A live sample renders your pair at both sizes — a sample only, not a claim about any real page — and for every failing level the nearest passing lighten/darken adjustment of text or background is offered as a copyable value. One click swaps the two colors.

Privacy ledger

Data acquired None.
Libraries used Lit 3 — bundled into the tool file itself.
Data stored None.
Data transmitted None.

Use it on your own page

Download the tool as a single self-contained HTML file: readable source with the Lit library included, zero network requests — it works opened straight from your disk, and you can customize everything.

Prefer the hosted widget? One script tag embeds it and stays up to date:

<script type="module" src="https://uuutil.com/tools/contrast-checker.js"></script>
<uu-contrast-checker lang="en"></uu-contrast-checker>

Source license: MIT — free to use, modify and redistribute; keep the license notice in copies.