← GlossQuote Labs home · 繁體中文

WCAG Colour Contrast Checker

Enter a foreground and a background colour to get the WCAG 2.1 contrast ratio and AA / AAA verdicts. Colours with alpha are composited in a pinned order before the calculation, and when a pair fails the tool searches for the smallest foreground-only correction.

This tool checks a pair of colours, not a whole page; WCAG conformance involves much more than contrast.

Colour input

Accepted formats: #RGB, #RRGGBB, #RRGGBBAA (# optional), rgb(r, g, b), rgba(r, g, b, a); channels are integers 0–255 and alpha is 0–1. Swapping recomputes compositing from the raw inputs, so with alpha involved the ratio can change.

Results

Contrast ratio —

Every verdict compares the unrounded ratio against the threshold; the two decimals shown are display only. A pair displaying 4.50 still fails if its unrounded ratio is below 4.5.

LevelThresholdResult
AA normal text4.5:1—
AA large text3.0:1—
AAA normal text7.0:1—
AAA large text4.5:1—
Non-text (icons, control borders, chart marks)3.0:1—

Large text means at least 24 px, or at least 18.66 px (14 pt) when bold. The non-text row follows WCAG 1.4.11.

Preview

This is a 16 px normal-text preview, so you can feel how body text reads in this pair.

24 px large-text preview

Border sample

Correction suggestion (foreground only)