Contrast Checker
Check text and background contrast against WCAG AA and AAA for normal text, large text and UI parts, with an Arabic and English preview and the nearest passing colour.
The tool
How to use
- Choose the text colour and the background colour (or type their codes).
- See the ratio, which levels it passes and the Arabic and English preview.
- If it fails, pick the level you need and apply the nearest suggested text or background colour.
Privacy & how it works
Processes your data in the browser and stores nothing.
- Engine: lightweight in-page code, no external libraries.
- Works offline after you open it once.
Frequently asked questions
What are the thresholds?
Per WCAG 2.2: normal text needs 4.5:1 for AA and 7:1 for AAA. Large text (24px, or 18.66px bold, and up) needs 3:1 for AA and 4.5:1 for AAA. Borders of buttons, inputs and icons need 3:1.
How is the suggested colour found?
We keep the hue and chroma in OKLCH and only change lightness (darker or lighter) until the ratio is met, then pick the option closest to your colour. Greys are matched to the nearest grey.
Is passing the ratio enough?
It is the accepted minimum, but font size, weight and style matter too. Thin Arabic typefaces usually need a larger size than Latin ones to read comfortably.
Do you support APCA?
No. The tool applies the WCAG 2.x formula, which is the current official standard. APCA is proposed for WCAG 3 and is still a draft.