Color Contrast Checker

Compute WCAG 2.x contrast from two sRGB colors in the browser: pick foreground and background (color picker, hex, or 0–255 RGB), swap them, preview sample text sizes, see ratio to two decimals, and Pass/Fail for AA/AAA normal and large text. Optional hex hint when AA normal fails — no upload.

a11ycolorwcagcontrastaccessibility

Category: Image & Graphics Tools

Foreground color

Background color

Preview

Sample Text

Sample Text

Sample Text

Sample Text

21.00 : 1

Contrast ratio

  • WCAG AA Normal text (≥4.5)Pass
  • WCAG AA Large text (≥3.0)Pass
  • WCAG AAA Normal (≥7.0)Pass
  • WCAG AAA Large (≥4.5)Pass

What is the Color Contrast Checker?

The Color Contrast Checker estimates how readable text will be when a foreground color sits on a background using the same relative luminance model as WCAG 2.x. You choose two sRGB colors via native color inputs, typed hex (including optional shorthand expansion), or numeric R/G/B fields. A Swap colors control exchanges foreground and background. The tool shows a live Preview block with sample text at several sizes plus bold body text, then prints the contrast ratio (lighter over darker, with 0.05 offsets) to two decimal places alongside Pass or Fail chips for common WCAG thresholds.

Thresholds and suggestions

The checklist covers WCAG AA normal text at ratio ≥ 4.5, AA large text at ≥ 3.0, AAA normal at ≥ 7.0, and AAA large at ≥ 4.5. “Large” follows WCAG definitions (typically larger type or bold body text—verify against the official spec for your exact typography). When AA normal fails and the ratio is still under 4.5, an amber hint may suggest a darker foreground hex produced by a simple iterative darken toward the same background—use it as a starting point, not a guarantee for every brand palette.

Privacy

All math and previews run locally in your browser. No color values are transmitted to Dynamic Duniya servers for this tool.

Frequently Asked Questions

Is this an official WCAG certification?

No. It is an educational calculator using the standard luminance and contrast formulas. Always validate critical compliance with your legal, design, and testing process—including real content and non-text contrast where applicable.

Does it support transparency or gradients?

The checker uses solid RGB pairs. Gradients, images behind text, and alpha blending need separate analysis in your design tool or browser devtools.

Which color space is assumed?

Calculations assume sRGB hex/RGB inputs converted with the usual piecewise linearization before luminance weights are applied.

Is the Color Contrast Checker free?

Yes for typical use on Dynamic Duniya.

Tips

Quick guidance for using our tools safely and effectively.

Privacy

Files are processed on the server for conversion only and are not used for training or shared with third parties.

Best results

Use the formats suggested in each tool. Large media files may take longer — keep the tab open until processing finishes.

Need something else?

Browse related tools below or explore other categories from the main Dev Tools hub.

Related tools

More utilities in the same category.

Image Compression

New

Compress JPEG, PNG, WebP, or GIF on the server (up to 10 MB per file). Drag-and-drop or browse, set quality 1–100 and optional max width in pixels (scales down only; default 1920). See before/after byte sizes when meta is returned, then download the compressed image.

imagecompress+5

Image Resize

New

Resize or reframe JPEG, PNG, WebP, or GIF entirely in your browser: set target width and height, optionally lock aspect ratio, then choose how pixels map—Fit (letterbox on white), Cover (center crop to fill), or Stretch. Export as JPEG, PNG, or WebP with a quality slider for lossy formats. Decoding and canvas work stay on your device (no upload). Animated GIFs flatten when exporting to static formats.

imageresize+1

Image Format Converter (JPG / PNG / WebP)

New

Convert JPEG, PNG, WebP, or GIF sources to JPEG, PNG, or WebP in your browser: live preview updates as you switch format, quality slider for lossy JPEG and WebP, lossless PNG (no quality control). Decoding and encoding stay on your device—no upload. GIF sources decode to a static frame; animation is not preserved in the output file.

imageconvert+1

Rotate & Flip Image

New

Rotate JPEG, PNG, WebP, or GIF photos in 90° steps (90°, 180°, −90°), flip horizontally or vertically, combine transforms, reset to original, and preview on canvas—all in your browser. Download keeps PNG/WebP as those types and uses JPEG for other extensions (including GIF sources). Live PNG preview; no upload. GIF animation is not preserved on export.

imagerotate+1

Add Text to Image

New

Overlay a single line of text on JPEG, PNG, WebP, or GIF photos entirely in your browser: edit the caption, font size (8–200px), fill color, horizontal and vertical position (0–100%), and optional dark stroke for contrast. Live preview; download as PNG, JPEG, or WebP with a quality slider for lossy formats. Canvas rendering stays local—no upload. GIF animation is not preserved when exporting.

imagetext+1

Image Background Remover

New

Cut out subjects in your browser with the IMG.LY ONNX + WASM segmentation model (ISNet quantized): first visit downloads WASM and model weights from their CDN (~tens of MB, then cached). Long edges above 2048px are scaled down before inference; max file size 8MB for stability. Export transparent PNG with checkerboard preview. Your pixels are not uploaded to Dynamic Duniya—only model assets load from the vendor CDN.

imagebackground+1