Skip to main content
Design & Media

Color & WCAG Contrast Checker

Convert between HEX, RGB/RGBA, and HSL/HSLA colors and verify WCAG 2.2 AA/AAA contrast ratios with alpha compositing.

WCAG 2.2 Contrast Evaluation

Alpha channels composited over effective opaque background.

13.98:1

Large Text Sample (18.66px bold / 24px regular threshold)

Normal body text contrast check: clear typography must remain readable across desktop monitors, mobile sunlight glare, and low-vision users.

WCAG AA Normal
≥ 4.5:1
PASS
WCAG AA Large / UI
≥ 3.0:1
PASS
WCAG AAA Normal
≥ 7.0:1
PASS
WCAG AAA Large
≥ 4.5:1
PASS

Foreground Conversions

HEX:#1E293B
HEXA:#1E293BFF
RGB / RGBA:rgb(30, 41, 59)
HSL / HSLA:hsl(217, 33%, 17%)

Background Conversions

HEX:#F8FAFC
HEXA:#F8FAFCFF
RGB / RGBA:rgb(248, 250, 252)
HSL / HSLA:hsl(210, 40%, 98%)
Tool Documentation & Guide

Color Contrast Checker & WCAG 2.2 Compliance Guide

Check color contrast ratios against WCAG 2.2 AA and AAA accessibility standards with alpha compositing.

Overview

The Color Contrast Checker measures the relative luminance contrast ratio between foreground and background colors according to WCAG 2.2 guidelines. It supports HEX, RGB, RGBA, HSL, and HSLA color formats, performs semi-transparent alpha compositing over backgrounds, and gives PASS/FAIL badges for normal text, large text, and UI components.

How to Check Contrast Compliance

1Select Foreground and Background Colors

Enter colors via HEX (#RRGGBB, #RRGGBBAA), RGB/RGBA, or HSL/HSLA, or use the visual color pickers.

2Review Contrast Ratio

The tool calculates the contrast ratio from 1:1 up to 21:1 using WCAG relative luminance formulas.

3Verify WCAG AA & AAA Badges

Check compliance badges for Level AA (4.5:1 normal text, 3:1 large text/UI) and Level AAA (7:1 normal text, 4.5:1 large text).

WCAG 2.2 AA Verification Example
Input
Foreground: #1E293B | Background: #FFFFFF
Output
Contrast Ratio: 13.9:1 | Level AA: PASS | Level AAA: PASS

Exceeds both the 4.5:1 normal text and 7:1 enhanced AAA thresholds, ensuring high readability for visually impaired users.

Supported Color Formats
  • HEX: 3, 4, 6, and 8 digits (#RGB, #RGBA, #RRGGBB, #RRGGBBAA).
  • RGB / RGBA: rgb(r, g, b), rgba(r, g, b, a).
  • HSL / HSLA: hsl(h, s%, l%), hsla(h, s%, l%, a).
  • Performs mathematical alpha blending over effective background colors.
Local Styling Analysis
  • All color calculations and palette previews execute 100% inside your browser.