Color Contrast Ratio Tester - Online WCAG AA/AAA Check
Enter foreground and background colors to instantly see the contrast ratio and pass/fail for AA and AAA. Simple and fast.
UD5 Toolkit
WCAG Contrast Matrix with Vision Deficiency Simulation
WCAG (Web Content Accessibility Guidelines) is an international standard for web accessibility developed by the W3C. Adequate color contrast ensures that text and interactive elements are readable by users with visual impairments, including low vision, color blindness, and those using screens in bright sunlight. Meeting WCAG contrast requirements is also a legal requirement in many jurisdictions under accessibility laws like ADA and Section 508.
The contrast ratio is calculated using the relative luminance of the two colors. First, each color's sRGB values are linearized, then the relative luminance is computed as: L = 0.2126 Ă— R + 0.7152 Ă— G + 0.0722 Ă— B. The contrast ratio is (L1 + 0.05) / (L2 + 0.05) where L1 is the lighter luminance. This yields a value between 1:1 (identical colors) and 21:1 (pure black vs pure white). The formula accounts for human perception of brightness.
AA Level (minimum): Requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (≥18pt or ≥14pt bold). This is the generally accepted minimum for web accessibility.
AAA Level (enhanced): Requires a contrast ratio of at least 7:1 for normal text and 4.5:1 for large text. This is a stricter standard providing better readability for users with significant visual impairments.
Protanopia (red-blind): Absence of red cone photoreceptors. Reds appear dark or brownish, and red-green discrimination is severely impaired. Affects ~1% of males.
Deuteranopia (green-blind): Absence of green cone photoreceptors. Similar to protanopia in effect, greens appear beige or brownish. Most common type, affecting ~1.5% of males.
Tritanopia (blue-blind): Absence of blue cone photoreceptors. Blues appear greenish and yellows appear pinkish. Very rare, affecting ~0.003% of the population.
Achromatopsia (total color blindness): Complete absence of color perception; the world appears in shades of gray. Extremely rare, affecting about 1 in 30,000 people.
Use this tool to check your color pairs under different vision deficiency simulations. Aim for pairs that maintain a strong contrast ratio (≥4.5:1) even when simulated. Additionally: avoid relying solely on color to convey information; use patterns, icons, or text labels as supplements; test your designs with simulation tools; and consider using high-contrast color combinations like dark blue on white or black on light yellow, which tend to work well across all vision types.
Yes. When you switch to a vision deficiency mode in this tool, the contrast ratios are recalculated based on the simulated colors. This helps you understand whether a color pair that passes WCAG under normal vision remains distinguishable for users with color vision deficiencies. A pair that passes AA normally might fall below the threshold when simulated, indicating potential accessibility issues.
Some color pairs that perform well across all vision types include: Black (#000000) on White (#FFFFFF) – 21:1 contrast; Dark Navy (#1a237e) on White – ~15:1; White on Dark Blue (#0d47a1) – ~12:1; Dark Charcoal (#212121) on Light Gray (#f5f5f5) – ~15:1; and Dark Green (#1b5e20) on Off-White (#fafafa) – ~14:1. These combinations maintain high contrast even when simulated for most color vision deficiencies.
This tool uses established color transformation matrices based on the Brettel-Viénot-Mollon model and Machado et al. research on color vision deficiency simulation. While no simulation can perfectly replicate the experience of a color-blind individual, these models are widely used in accessibility tools and provide a reliable approximation for design decision-making. For critical applications, we recommend also testing with real users and dedicated accessibility auditing tools.
Enter foreground and background colors to instantly see the contrast ratio and pass/fail for AA and AAA. Simple and fast.
Upload a gradient or enter a palette and simulate how it appears with different types of color vision deficiency. Ensure inclusive data visualization.
Given an RGB value, pick the matching color square. Multiple difficulty levels. Improve your color perception. Fun for designers.
Start from a base color and use `oklch(from color l c h)` to create lighter or darker variants. Copy the code.
Add a dramatic night‑vision green tint with grain and scanlines to any image. Fun horror/military aesthetic.
Enter a website URL and apply a protanopia/deuteranopia/tritanopia filter. Test full page accessibility.
Point your camera at an object and see the dominant color in real time. Click to copy the hex. Fun tool for designers.
Upload any picture and instantly get a 5‑color palette. Useful for UI design themes. Canvas‑based extraction.
Upload any image and view it as a person with deuteranopia, protanopia, or tritanopia would. Promote inclusive design.
Enter two hex colors and compute the CIE76, CIE94, and CIEDE2000 color difference. Understand how humans perceive color similarity.
Upload an image and instantly see its most dominant color as a hex swatch. Uses color quantization. Local.
Upload an image and extract its dominant colors or full color palette. Download as a CSS snippet or color swatch. Entirely client-side, your images stay private.
Extract a color palette from an image using CIELAB k‑means quantization. Results are perceptually more accurate than RGB methods.
Convert RGB and hex colors to CIELAB L*a*b* values. Understand perceptual lightness and chromaticity. All local math.
A dedicated color picker with common retro gaming palettes (NES, Gameboy). Pick and copy hex codes. For pixel art creators.
Select two paint colors and see approximate mixed result. Visual blending for artists.
Enter an image URL and extract its dominant color palette. No download needed. Fast visual analysis.
Enter hex codes and download a PNG swatch image with color names. Useful for design spec documents. Built via canvas.
Generate the <meta name='color‑scheme'> tag and CSS property to enable native dark/light rendering. Quick copy.
Browse the OKLCH color space with sliders for lightness, chroma, and hue. See the CSS oklch() code. Modern and accessible.
Convert hex or RGB to CIELAB L*a*b* values. Understand perceptual lightness and color opponents. Local math.
Enter the URL of any online image and extract its dominant colors or pick colors with a magnifier. No upload, cross‑origin friendly.
Create photo collages by arranging multiple images on a canvas. Select grid templates or freeform placement. Export as single image. Secure local processing.
Upload a photo and remap its tones to any gradient. Apply stunning color grading. Download result.
An interactive color wheel that teaches primary, secondary, tertiary colors, and harmonies. Pick and mix like a pro.
Upload two images and see a diff overlay highlighting the pixel differences. Adjust tolerance. For regression testing.
Run edge detection algorithms (Sobel, basic Canny) on images directly in the browser. Great for learning computer vision concepts.
Upload a small pixel art image and get a CSS grid layout that recreates it using divs. Novelty developer tool.
Interactively apply CSS filter functions (blur, brightness, contrast, etc.) to an image and copy the resulting filter property. No coding required.
Convert RGBA colors to CIELAB and other advanced color spaces. For fine‑tuning design tokens. Client‑side math.