KitBench

Color Contrast & WCAG Accessibility Checker

Test foreground and background contrast against WCAG 2.2 AA, AAA, and 3:1 UI component requirements with one-click accessible shade suggestions.

Privacy Notice: Runs locally in your browser without uploading files to external servers or requiring an account.

Interactive Browser Workspace

Loading the interactive Color Contrast & WCAG Accessibility Checker workspace. Enable JavaScript in your browser to run calculations and conversions locally.

How to Use Color Contrast & WCAG Accessibility Checker

  1. Enter or pick Foreground (text) and Background HEX colors, or swap them with one click.
  2. Inspect the exact contrast ratio and Pass/Fail results for AA Normal (4.5:1), AA Large (3.0:1), AAA Normal (7.0:1), and UI Components (3.0:1), and apply one-click accessible shade fixes if needed.

Methodology & Accuracy

Implements the W3C WCAG 2.2 relative luminance formula (`L = 0.2126 R + 0.7152 G + 0.0722 B` after sRGB gamma linearization) and iteratively searches lightness steps along the same hue until 4.5:1 contrast is achieved.

Examples

  • #0F172A on #FFFFFF yields 17.85:1 (passes AA and AAA).
  • Fix a low-contrast #60A5FA link on #FFFFFF using the one-click accessible darker shade.

Scope & Limitations

  • Tests solid opaque foreground and background colors; gradients or semi-transparent overlays depend on composite pixels.

Frequently Asked Questions

What ratio is required for WCAG AA normal text?

Normal body text requires at least 4.5:1, while large text (18pt or 14pt bold) and active UI controls require at least 3.0:1.

What is the minimum contrast for UI borders and icons?

WCAG 2.2 Success Criterion 1.4.11 requires at least 3.0:1 contrast for active user interface components.

Related Tools

  • Color Palette Generator - Generate monochromatic, analogous, complementary, split-complementary, triadic, tetradic, and shade/tint palettes with CSS variable export.
  • HEX Color Picker - Pick colors visually and copy formatted HEX, RGB, HSL, and CSS custom property values.
  • CSS Button Generator - Design accessible HTML/CSS buttons with padding, radius, hover elevation, focus-visible ring, and WCAG contrast verification.