WCAG Contrast Calculator
WCAG 2.1 + APCA contrast with multi-format input, detailed breakdown, auto-suggestion and live preview
Calculate WCAG 2.1 and APCA (WCAG 3.0) contrast between two colors. Accepts HEX, RGB, HSL, OKLCH, LAB and CSS names. Detailed AA/AAA breakdown, auto-suggest accessible color and live preview with UI components.
Quick Pairs
Colors
WCAG 2.1 Contrast Ratio
14.89
:1WCAG 2.1 Breakdown
Excellent readability
Live Preview
Heading Example
This is how your text will look with the selected colors. Good contrast ensures readability for all users, including those with visual impairments.
Secondary text with reduced opacity
How it works
This tool calculates color contrast using two standards: WCAG 2.1 (current) and APCA (WCAG 3.0) (upcoming). It accepts colors in any format (HEX, RGB, HSL, OKLCH, LAB, CSS names) and displays each color in 5 formats simultaneously.
Tool Features
- Multi-format input: Type HEX, RGB, HSL, OKLCH, LAB or CSS names (e.g. "steelblue")
- Multi-format display: Each color shown in HEX, RGB, HSL, OKLCH and LAB with individual copy
- WCAG 2.1 breakdown: Individual badges for Normal Text AA/AAA, Large Text AA/AAA and UI Components
- APCA (WCAG 3.0): Lc score with readability interpretation
- Auto-suggestion: When contrast fails, suggests the closest color that passes AA
- Live preview: Headings, paragraphs, buttons, links, checkboxes, radios and toggles
- Quick pairs: 6 predefined combinations for fast testing
- Color swap: Switch text/background with one click
WCAG 2.1 vs APCA (WCAG 3.0)
- WCAG 2.1: Simple ratio (4.5:1 for AA, 7:1 for AAA). Doesn't consider font size or weight.
- APCA: Advanced algorithm producing an Lc value. Considers contrast direction (text on bg vs bg on text). Lc ≥60 = good for text, Lc ≥75 = excellent.
WCAG 2.1 Conformance Levels
- Level AA: 4.5:1 for normal text, 3:1 for large text (≥24px or ≥18.5px bold)
- Level AAA: 7:1 for normal text, 4.5:1 for large text
- UI Components: 3:1 for icons, borders, focus states
💡 Practical Examples
Case 1: CTA button with auto-suggestion
Your orange button #FF6B35 with white text has a 3.2:1 ratio. The tool automatically suggests a darker orange that passes AA.
Case 2: Verify with OKLCH
Paste oklch(0.55 0.15 265) directly in the input and the tool converts it automatically. You'll see the HEX, RGB, HSL and LAB equivalents instantly.
Case 3: UI component preview
The preview shows headings, paragraphs, primary/secondary buttons, links, checkboxes, radios and toggles — all with your colors. Adjust font size and weight to see how it affects readability.