Color Contrast Ratio Calculator

Check the contrast ratio of two colors for accessibility.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

This calculator computes the WCAG contrast ratio between two colors using (L1 + 0.05) / (L2 + 0.05), where L1 and L2 are the relative luminances of the lighter and darker colors, each derived from the sRGB channel values via the WCAG's gamma-corrected luminance formula. The result ranges from 1:1 (identical colors) to 21:1 (pure black on white), and is checked against the Web Content Accessibility Guidelines thresholds — 4.5:1 for normal text and 3:1 for large text at AA level, 7:1 and 4.5:1 respectively for the stricter AAA level.

Web designers, front-end developers, and accessibility auditors use this to ensure text and UI elements meet legal and usability accessibility standards (WCAG 2.1, ADA, Section 508 compliance) for users with low vision or color blindness. Enter two hex colors to get the contrast ratio and pass/fail status.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators