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.
Enter a website URL and apply a protanopia/deuteranopia/tritanopia filter. Test full page accessibility.
Enter two hex colors and compute the CIE76, CIE94, and CIEDE2000 color difference. Understand how humans perceive color similarity.
Enter an image URL and extract its dominant color palette. No download needed. Fast visual analysis.
Given an RGB value, pick the matching color square. Multiple difficulty levels. Improve your color perception. Fun for designers.
Point your camera at an object and see the dominant color in real time. Click to copy the hex. Fun tool for designers.
Upload an image and see its RGB and luminance histograms. Understand exposure and color distribution. Photographer tool.
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.
Add a dramatic night‑vision green tint with grain and scanlines to any image. Fun horror/military aesthetic.
Pick colors from a palette or use the eye dropper to sample colors from your screen. Converts between HEX, RGB, HSL. An essential tool for designers.
Extract a color palette from an image using CIELAB k‑means quantization. Results are perceptually more accurate than RGB methods.
Upload an image and also see a UI mockup under different deficiencies side‑by‑side. Powerful for inclusive design.
A dedicated color picker with common retro gaming palettes (NES, Gameboy). Pick and copy hex codes. For pixel art creators.
Enter the URL of any online image and extract its dominant colors or pick colors with a magnifier. No upload, cross‑origin friendly.
Choose a pre-drawn pixel outline and fill cells with colors. Save your masterpiece. Meditative fun.
Reduce the number of colors in an image to a retro 8‑bit look. Uses median cut quantization in the browser. Preview and download the stylized result.
Upload any image and view it as a person with deuteranopia, protanopia, or tritanopia would. Promote inclusive design.
Select colors in the OKLCH space with lightness, chroma, and hue. Convert to hex, RGB, and CSS oklch(). Perceptually uniform gradients.
See a random color and type its name. Score based on accuracy. Fun for designers. Local.
Interactively create colors in HWB space and get the CSS hwb() function. Simplifies tint/shade workflows. Live preview.
An interactive color wheel that teaches primary, secondary, tertiary colors, and harmonies. Pick and mix like a pro.
Upload a small pixel art image and get a CSS grid layout that recreates it using divs. Novelty developer tool.
Upload two images and see a diff overlay highlighting the pixel differences. Adjust tolerance. For regression testing.
Upload an image and instantly see its most dominant color as a hex swatch. Uses color quantization. Local.
Convert hex or RGB to CIELAB L*a*b* values. Understand perceptual lightness and color opponents. Local math.
Browse the OKLCH color space with sliders for lightness, chroma, and hue. See the CSS oklch() code. Modern and accessible.
Convert RGB and hex colors to CIELAB L*a*b* values. Understand perceptual lightness and chromaticity. All local math.
Generate a harmonious three‑color palette with a matching simple favicon shape. Perfect for quick project identity. All local.
Enter hex codes and download a PNG swatch image with color names. Useful for design spec documents. Built via canvas.