Color Contrast Checker
Compare text and background colors. See their contrast ratio and check the numerical WCAG thresholds for normal text, large text and essential interface details.
Check a pair of colors
- Enter each color as a three- or six-digit HEX value, or choose it with its color picker. The background must be a solid opaque color.
- Leave foreground opacity at 100% for opaque text, or enter a lower percentage for a transparent foreground. Results update when all three values are valid.
- Read the ratio and the separate normal-text, large-text and non-text outcomes. Check your actual design context, then copy the qualified report if you need to share the comparison.
Read the contrast results
For normal text, the numerical thresholds are 4.5:1 at AA and 7:1 at AAA. The calculation compares relative luminance, rather than judging how different the color names sound.
Large text uses 3:1 at AA and 4.5:1 at AAA. Large means at least 18pt regular or 14pt bold, or an equivalent size for other scripts. These are about 24 and 18.67 CSS pixels; actual typography still needs review.
Foreground opacity changes the effective color over the entered background. At 100% the foreground is opaque. At 0% it disappears into the background and has a ratio of 1:1. Background transparency is outside this tool’s scope.
The 3:1 non-text row compares this pair for essential visual details against an adjacent color. Every decision uses the unrounded ratio; the two-decimal headline is only a readable display.
Examples you can verify
Black #000000 against white #FFFFFF at 100% opacity gives 21:1, meeting all five displayed numerical thresholds. Swapping those opaque colors leaves the ratio unchanged.
Gray #777777 against white gives about 4.48:1. It does not reach the 4.5:1 threshold for normal text at AA, although it exceeds the 3:1 threshold for large text at AA.
Black at 50% opacity over white gives about 3.98:1 in this sRGB calculation. Reducing opacity can remove contrast even when the original opaque pair has a strong ratio.
A pair check is one part of accessibility
This tool evaluates solid sRGB colors with an opaque background and optional foreground opacity. It does not inspect a page, read fonts, sample images or gradients, simulate color vision, or assess every WCAG requirement and exception.
A numerical threshold result does not certify a page or product as accessible. Review actual text size and weight, adjacent colors, meaningful shapes, states and other accessibility requirements. Display rendering and antialiasing can also affect practical readability.
Calculated in your browser
The comparison runs in your browser without tool-added uploads or saved color history. Copy writes the current report to your clipboard only when requested. Normal site services and consent settings remain separate.
Color contrast questions
Sources and method
- w3.orgWCAG 2.2 relative luminanceDefines relative luminance for sRGB colors.
- w3.orgContrast (Minimum)Explains the AA thresholds for text.
- w3.orgContrast (Enhanced)Explains the AAA thresholds for text.
- w3.orgNon-text ContrastExplains contrast for relevant interface and graphical information.
- w3.orgSimple alpha compositingDescribes source-over compositing used for foreground opacity.
These results assess numerical contrast for the entered pair only; they do not establish WCAG conformance.
Related tools
SVG to PNG
Convert a local SVG file or pasted markup into PNG, with explicit dimensions, transparency and bundled fonts.
Open tool — SVG to PNGCSS Filter Generator
Order and repeat CSS effects, compare a specimen and copy the exact filter declaration.
Open tool — CSS Filter GeneratorFluid Font Size Calculator
Create root-relative CSS from viewport endpoints and inspect the copied size model.
Open tool — Fluid Font Size CalculatorCSS Button Generator
Style native button states, inspect keyboard focus and copy HTML and CSS.
Open tool — CSS Button GeneratorCSS Border Radius Generator
Edit eight corner radii, preview a box and copy CSS in pixels or percentages.
Open tool — CSS Border Radius GeneratorCSS Grid Generator
Build a bounded CSS Grid example with editable tracks, placement and named areas. Preview it, copy CSS or HTML and download the same standalone example.
Open tool — CSS Grid GeneratorCSS Flexbox Generator
Build a Flexbox example with container and item controls, explicit layout axes, matching CSS and HTML, and a local complete-example download.
Open tool — CSS Flexbox GeneratorCSS Text Shadow Generator
Build ordered text shadows, preview plain text and copy exact CSS.
Open tool — CSS Text Shadow GeneratorCSS Transform Generator
Compose repeatable 2D CSS transforms, edit px or percentage translation and origin, inspect a reference box and copy the exact current declarations.
Open tool — CSS Transform GeneratorCSS Box Shadow Generator
Create ordered CSS box-shadow layers with a live preview and copyable code.
Open tool — CSS Box Shadow GeneratorImage Watermark
Add a text or logo watermark to a batch of images, review each result and download individual files or a ZIP.
Open tool — Image WatermarkCSS Gradient Generator
Create linear or radial CSS gradients with editable colors, opacity and stops.
Open tool — CSS Gradient GeneratorColor Converter
Convert supported sRGB HEX, RGB and HSL literals with alpha, explicit precision and current code Copy.
Open tool — Color ConverterImage to Text (OCR)
Recognize printed text in local PNG or JPEG images, choose a language and review or correct the result before copying or downloading.
Open tool — Image to Text (OCR)QR Code Reader
Read one QR code from a local PNG or JPEG and inspect its text or content bytes without opening links.
Open tool — QR Code ReaderPrint Size & Resolution Calculator
Calculate print dimensions, required pixels and effective PPI with fit or crop.
Open tool — Print Size & Resolution CalculatorAspect Ratio Calculator
Find a width-to-height ratio or calculate a matching pixel size from one target dimension.
Open tool — Aspect Ratio CalculatorImage Compressor
Try to fit a JPEG, PNG or WebP within a target file size, with measured results and optional smaller dimensions.
Open tool — Image CompressorHEIC to JPG
Convert supported HEIC photos locally into full-size JPG copies, with quality and background controls and verified individual or ZIP downloads.
Open tool — HEIC to JPGImage Converter
Convert supported PNG, JPEG and WebP images locally with batch targets, transparency, background and quality controls, then review and download the encoded files.
Open tool — Image ConverterPhoto Collage Maker
Arrange local photos in a grid, adjust crops and spacing, and download PNG or JPEG.
Open tool — Photo Collage MakerRotate & Flip Images
Rotate or mirror a local batch of static PNG, JPEG and WebP images, then review and download the processed results.
Open tool — Rotate & Flip ImagesImage Cropper
Crop one local JPEG, PNG or WebP to exact pixels with visual and numeric controls. Download PNG or JPEG.
Open tool — Image CropperImage Resizer
Resize a JPG, PNG or WebP image by pixels or percentage, preview the result and download it.
Open tool — Image Resizer