Color Contrast Checker
Your input stays in your browser and is never sent.Calculate the contrast ratio between a text color and a background color and check it against WCAG 2.x AA and AAA for normal text, large text and UI components.
- Enter
- See the result
Enter colors as HEX (#475569), rgb(), hsl() or a color name.
- Normal textTypical body text size
- AA 4.5:1 PassAAA 7:1 Pass
- Large text24px or larger, or bold 18.66px or larger
- AA 3:1 PassAAA 4.5:1 Pass
- UI components & graphicsButton borders, icons and the like
- AA 3:1 Pass
The quick brown fox jumps over the lazy dog.
Large text sample
What is the color contrast checker?
The color contrast checker calculates the contrast ratio between a text color and a background color. It judges whether the pair meets AA and AAA of WCAG 2.x, the international web accessibility standard, for normal text, large text and UI components.
The ratio runs from 1:1 (the same color) to 21:1 (black on white). The higher the number, the easier the text is to read, including for people with low vision and on a screen in bright sunlight.
Use it when choosing a site's colors or reviewing a design. No sign-up or login, and it's free.
How to use the color contrast checker
- Enter the text colorPick a color, or type it as HEX, rgb(), hsl() or a color name.
- Enter the background colorEnter the background the same way. The swap button reverses the two.
- Check the resultThe contrast ratio and the AA and AAA results appear right away.
Features of SOKUFU's color contrast checker
- Three kinds judged at once
- See the results for normal text, large text and UI components in one table.
- Never rounds a near miss into a pass
- A value such as 4.499 is not rounded up to 4.5; the ratio is cut off after two decimals. A color shown as passing really meets the standard.
- A live sample
- Body text and large text are shown in your colors so you can judge readability by eye.
- Many ways to write a color
- Enter HEX, rgb(), hsl() or a basic color name.
- Runs in your browser
- Nothing you enter is ever sent to a server.
- Works on phones
- The layout adapts to your screen, so it works on phones and tablets too.
The contrast ratio standards (WCAG 2.x)
For normal text the standard is 4.5:1 or more for AA and 7:1 or more for AAA. Large text is relaxed to 3:1 or more for AA and 4.5:1 or more for AAA.
Large text means text of 24px (18pt) or more, or bold text of 18.66px (14pt) or more. Non-text parts such as button borders and icons need 3:1 or more at AA, and there is no AAA standard for them.
The ratio is the lighter color's relative luminance plus 0.05, divided by the darker color's relative luminance plus 0.05.
Related tools to use with the color contrast checker
- Color Code Converter (HEX, RGB, HSL)Use it to turn a color into HEX, RGB or HSL so it's easy to enter.
- Tailwind Color GeneratorUse it to make 11 shades of different lightness from one base color and look for readable pairs.
- Image Color PickerUse it to pick the text or background color from an image and check its contrast.
Color contrast checker FAQ
What value counts as a pass?
For normal text, 4.5:1 or more for AA and 7:1 or more for AAA. For large text, 3:1 or more for AA and 4.5:1 or more for AAA.
What counts as large text?
Text of 24px (18pt) or more, or bold text of 18.66px (14pt) or more.
Can I use colors with transparency?
The color is read, but transparency is ignored and the color is treated as opaque. The effect of overlapping colors isn't reflected.
Why is there no AAA for UI components?
WCAG 2.x only sets a 3:1 AA standard for non-text parts and defines no AAA level for them.
Are the colors I check sent to a server?
No. The contrast ratio and the pass/fail results are worked out in your browser. The text and background colors you enter are not sent anywhere.
Related tools
- Color Code Converter (HEX, RGB, HSL)Convert a color code between HEX, RGB and HSL in any direction. Every form is listed side by side, including the one PowerPoint accepts.
- RGB to HEX ConverterTurn an RGB value (59, 130, 246) into a HEX color code (#3B82F6). The forms without # and with alpha are listed too, ready to copy.
- HEX to RGB ConverterTurn a HEX color code (#3B82F6) into RGB (59, 130, 246). The R, G and B numbers PowerPoint asks for can each be copied on their own.
- Dummy Image GeneratorMake a placeholder image on the spot by choosing its width, height, colors and text. Save it as PNG, JPG, WebP or SVG, or copy it as a data URI.
- CSS Gradient GeneratorBuild linear, radial and conic gradients by moving the angle and color stops, then copy the CSS. The CSS shown is exactly what the preview uses.
- CSS Cursor ListBrowse all 36 values you can give the CSS cursor property and try each as a real cursor. Press a card to copy cursor: value;.
- Gradient Image GeneratorTurn a linear, radial or conic gradient into an image of any size and download it as PNG, JPG or WebP. Handy for backgrounds and wallpapers.
- Image Color PickerLoad an image and press anywhere on it to get that spot's color as HEX, RGB and HSL. The five main colors of the whole image are listed too. The image never leaves your device.
- Tailwind Color GeneratorBuild the 11-step Tailwind CSS palette (50 to 950) from one base color, and copy it as @theme (v4), tailwind.config (v3) or a plain HEX list.
- CSS Filter GeneratorMove sliders for nine CSS filter functions — blur, brightness, contrast, grayscale and more — and copy the CSS while watching Before and After. You can try it on your own image.
- Online Ruler (Actual Size)Show a ruler on your screen at real-world size. Match the screen to a card you have on hand, then measure in cm and mm or in inches. Free, no sign-up.
- Drawing Prompt RouletteSpin a wheel to choose what to draw next. Over 30 prompts that pair a subject with a scene are included, and you can rewrite them for practice or events.