flavors
Images3DToolsPricingSponsor
← All Flavors Free Tools

WCAG Color Contrast Checker

Test foreground and background colors in HEX, RGB, or OKLCH against WCAG 2.1 AA, AAA, and UI component thresholds. Fix failing pairs in one click with perceptual OKLCH lightness adjustment and copy accessible CSS or Tailwind v4 tokens.

Starter pairs:
Foreground (Text / Icon)#FB7185
rgb(251, 113, 133)oklch(71.9% 0.169 13.4)
Background (Surface)#FEF2F2
rgb(254, 242, 242)oklch(97.0% 0.013 17.4)
1-Click OKLCH Smart Auto-Fix
WCAG 2.1 Contrast Ratio
2.46:1
Fail
≥ 4.5:1Fail
Normal Text AA
≥ 7.0:1Fail
Normal Text AAA
≥ 3.0:1Fail
Large Text AA
≥ 4.5:1Fail
Large Text AAA
≥ 3.0:1Fail
UI Components AA
UI Specimen · Fail#FB7185 on #FEF2F2

Large Heading (24px+ Bold · AA ≥ 3:1)

Normal body copy at 16px needs at least a 4.5:1 contrast ratio for WCAG AA readability and 7.0:1 for AAA. Clear contrast makes cards, navigation links, and error messages effortless to read on every display.

Interactive Card & UI Controls (≥ 3:1)Ratio 2.46:1
Primary ButtonOutline ControlInput field border
Export accessible pair
CSS Variables
/* WCAG Fail — Contrast Ratio 2.46:1 */
:root {
  --color-background: #fef2f2; /* oklch(97.0% 0.013 17.4) */
  --color-foreground: #fb7185; /* oklch(71.9% 0.169 13.4) */
}

.accessible-surface {
  background-color: var(--color-background);
  color: var(--color-foreground);
}
Flavors Pro · $49/yr or $9/mo

Turn accessible color pairs into full UI systems

Ship accessible palettes inside complete DESIGN.md specs, Tailwind v4 + shadcn theme kits, and AI-ready design systems your coding agent can install in one command.

Unlock full systems in Flavors ProSign in straight to $49/yr checkout

FAQ

What is the difference between WCAG AA and AAA color contrast?

WCAG 2.1 Level AA requires at least 4.5:1 contrast for normal body text (under 18pt / 24px regular or 14pt / 18.66px bold) and 3:1 for large text and non-text UI components like icons, focus rings, and form borders. Level AAA raises those thresholds to 7:1 for normal text and 4.5:1 for large text.

How does the 1-click OKLCH Auto-Fix preserve brand color?

The 1-click Auto-Fix solver converts your color into perceptual OKLCH space, preserves your brand hue and saturation, and binary-searches for the closest lightness that meets 4.5:1 (AA) or 7:1 (AAA) against the paired surface.

Can I check OKLCH and RGB colors, not just HEX?

Yes. Paste any valid 3- or 6-digit HEX code, rgb(r, g, b) value, or modern oklch(L% C H) color directly into either input and the ratio, badges, and live preview update immediately.

What does the UI Components AA badge measure?

Under WCAG 2.1 Success Criterion 1.4.11 (Non-text Contrast), interactive controls such as button outlines, checkboxes, focus indicators, and input borders need at least a 3:1 ratio against adjacent background colors.

How do I export an accessible color pair to CSS or Tailwind v4?

Use the export panel below the preview to copy CSS Custom Properties, Tailwind v4 @theme OKLCH tokens, or JSON containing both colors, their OKLCH coordinates, and their verified WCAG grade.

More Free Design Tools

View all tools →
16 Google Font pairs

Google Font Pairings Generator

16 curated Google Font heading + body pairings with live editable preview, Google Fonts link & Tailwind v4.

Open tool
5-layer shadows

CSS Box Shadow Generator

Multi-layer CSS box-shadow studio with 8 curated presets, inset support & Tailwind utility export.

Open tool
70s · 80s · 90s · Y2K

Retro Color Palette Generator

70s groove, 80s synthwave, 90s Memphis, Y2K Chrome, Mid-Century, Bauhaus & Kodak Film palettes.

Open tool
Curated moods & WCAG

Aesthetic Color Palette Generator

Matcha & Cream, Dark Academia, Japandi, Pastel Dream & harmony sliders with WCAG badges.

Open tool
HTML · BRAND.md · CSS

Brand Guidelines Generator

Build a live mini brand book and export HTML brand sheet, BRAND.md or CSS design tokens.

Open tool
CSS & Tailwind v4

Gradient Border CSS Generator

Rounded & transparent CSS border gradients with padding-box, mask-composite & Tailwind v4.

Open tool
50–950 OKLCH scales

Tailwind v4 Palette Generator

Perceptually uniform 50–950 Tailwind v4 OKLCH scales and dark-mode palettes.

Open tool
HEX ↔ OKLCH

OKLCH Color Converter

Convert HEX to OKLCH and OKLCH to HEX with live Lightness, Chroma & Hue sliders.

Open tool
Frosted glass CSS

CSS Glassmorphism Generator

Frosted-glass CSS & Tailwind v4 cards with live backdrop-filter blur and saturation.

Open tool

flavors · a vibe is not a template · © 2026

FlavorsImages3DFree ToolsPricingBlogAboutContactSponsorChangelogReport BugCommunityPrivacyTermsAffiliates
Popular toolsGoogle Font PairingsBox Shadow GeneratorColor Contrast CheckerRetro Color PaletteAesthetic PaletteBrand GuidelinesGradient Border CSS