AI Tools Free

Color Contrast Checker

Check the WCAG 2 contrast ratio between an opaque text color and background. This online color contrast checker shows AA and AAA outcomes for normal and large text.

Free to useNo sign-upRuns in your browser
Enter your details

Enter the inputs, then select Check contrast.

Your result
Enter your details

Result will appear here

How Color Contrast Checker works

The checker converts two opaque hexadecimal colors to relative luminance and compares their unrounded contrast ratio with the displayed thresholds.

The displayed ratio is rounded to two decimal places. The normal and large text outcomes describe this color pair; they do not certify the accessibility of a whole page.

Enter a three digit or six digit hexadecimal color for each field.

Reference: W3C: Contrast minimum.

Light and dark text/background pairs connected for contrast comparison.
Illustration of the Color Contrast Checker workflow.

Color Contrast Checker Quick Reference & Input Guide

Review the input parameters, allowed value ranges, and worked reference cases for the Color Contrast Checker below before running your calculation.

Parameter / ScenarioDefault / Sample ValueRule or Allowed RangeOutput / Usage Note
Input: Text hex color#000000Input type: textRequired workspace parameter
Input: Background hex color#ffffffInput type: textRequired workspace parameter

How to use Color Contrast Checker

Enter the opaque text color and the opaque background color used together in the component.

Set the actual opaque pair

Enter the hexadecimal text color and the solid background immediately behind it. Use the component values rather than a nearby border or panel color. Alpha and image backgrounds are outside this pair calculation.

Text hex color
Color Contrast Checker native input panel with the actual Text hex color, Background hex color settings used for this example.
Configure Text hex color, Background hex color; select Check contrast.

Calculate the contrast ratio

Run the checker and inspect the ratio and color-pair preview. The ratio shown is rounded for display, while threshold checks use the full calculated value.

4.48:1
Color Contrast Checker actual result panel showing 4.48:1.
Submitted result: 4.48:1. AA normal text (4.5:1): Fail.

Read the relevant text outcomes

Review AA and AAA for normal and large text separately, using the actual font size and weight. The supporting rows describe this pair; the note does not certify the rest of the interface.

Output details
Color Contrast Checker actual output details region and result note after submitting the pictured settings.
Review the actual Color Contrast Checker output. Read the result note.

When to use Color Contrast Checker

Compare baseline and alternative runs for Color Contrast Checker before exporting the result.

Check body text color contrast

Test body copy against the page background before adding it to a style guide. Use the normal text outcome unless the rendered text qualifies as large. A heading label in the design file does not determine its contrast category.

Website page details represented by connected information cards.
Prepare the page details. Concept illustration.

Check a button label

Enter the label color and the solid button fill to inspect that state. Repeat for each fill used by hover or focus. If the button has a gradient, identify the colors behind the letters separately instead of treating one endpoint as the whole background.

Website information shown in two conceptual preview formats.
Review a working example. Concept illustration.

Compare muted text choices

Test alternative colors for secondary information such as captions or counts. Record which pair each result refers to so the design discussion stays tied to a specific background. Contrast alone does not decide whether the information is visually prominent enough.

A website document and related pages connected in a workflow.
Continue your site workflow. Concept illustration.

Read WCAG AA and AAA text contrast thresholds

Review the calculated output alongside your entered parameters and unit conventions.

Every calculation follows the rule: Contrast = (lighter relative luminance + 0.05) ÷ (darker relative luminance + 0.05). Because JavaScript uses IEEE 754 double-precision floating-point arithmetic, numeric outputs display up to 12 significant digits where applicable.

Always cross-check the displayed result against the scope note (WCAG AA needs 4.5:1 for normal text or 3:1 for large text; AAA needs 7:1 or 4.5:1. Large text means at least 18 pt, or 14 pt bold. Alpha, images, gradients, and an entire page's accessibility are not assessed) before applying the value to production specifications, financial models, or lab records.

Website output represented alongside a review preview.
Understand the generated result. Concept illustration.

Check unsupported backgrounds

Choose the actual foreground and background colors before applying the result to a design.

Operational scope: WCAG AA needs 4.5:1 for normal text or 3:1 for large text; AAA needs 7:1 or 4.5:1. Large text means at least 18 pt, or 14 pt bold. Alpha, images, gradients, and an entire page's accessibility are not assessed. Inputs that violate minimum/maximum bounds or required format rules are rejected with a clear diagnostic prompt.

Need an adjacent calculation in Web & Accessibility? Use the related tools linked below to chain your workflow without leaving your browser.

Page details reviewed before use in a website.
Review before using it on a site. Concept illustration.

Frequently Asked Questions About Color Contrast Checker

Answers about using Color Contrast Checker and understanding its results.

Does a pass mean my whole page is accessible?

No. It checks one opaque text/background color pair only.

Are rounded results used for pass/fail?

No. Threshold checks use the unrounded ratio.

Can I test a translucent color?

Alpha is not modeled here. Determine the resulting opaque foreground and background before entering the pair.

Can this check a gradient background?

This calculation accepts two opaque hexadecimal colors. A gradient has different colors at different positions, so one endpoint does not describe the whole background.

Check text and background color contrast

Choose another tool for your next calculation, conversion, or text task.

Check a color pair