Whether anyone can read it
CONTRASTChecks a color pair against WCAG 2.1, shows the working, and when it fails hands you the nearest color that passes. It also grids a palette, reads colors from a screenshot and simulates color blindness.
The pair
Type a hex value, an rgb() or an hsl(), or open the picker. A CSS color name works too.
Large text, 24 pixels and bold
Body text at fifteen pixels, the size most of a document is set in, with enough of it here to judge whether the eye has to work.
Small print at twelve and a half, where a weak pair gives itself away.
If it fails, the nearest color that does not
Both colors keep their hue and their saturation. Only the lightness moves, and only as far as it has to.
The same pair, three other eyes
Simulated with the Machado 2009 model at full severity, in linear light.
A whole palette, every pair at once
Paste a stylesheet, a list of hex values or a JSON theme file. Every color found is drawn against every other.
Drop a file of colors here, or
The colors already in a picture
Drop a screenshot, a brand sheet or a mock-up and get the eight colors it is mostly made of.
Drop a PNG, JPEG or WebP here, or
In more detail
CONTRAST checks whether text will be readable. It also checks a whole palette as a grid, handles colors with transparency, and explains what counts as large text. The colors stay in this tab.
Questions people ask about CONTRAST
What counts as large text?
WCAG 2.1 puts the line at 18 point, which is 24 CSS pixels, or 14 point bold, which is about 18.66 CSS pixels. Below that a pair needs 4.5:1 for AA and 7:1 for AAA; at or above it, 3:1 and 4.5:1. Bold counts because a thicker stroke puts more colored pixels on the page.
Why does my other checker say a different number?
Almost always rounding. This page truncates at two decimals so a failing value cannot print as a passing one, and some checkers round. If the gap is larger than a hundredth, check whether the other tool is applying alpha: a color with transparency has no contrast ratio until you say what is behind it, and this page ignores the alpha channel rather than guessing.
Does a 3:1 pass mean my buttons are fine?
It means the visual boundary of the component meets 1.4.11. The label inside it is text and still needs 4.5:1, the focus indicator has its own requirement, and a control that is only distinguishable by color fails 1.4.1 no matter what the ratio is.
Can I check a color with transparency?
Not directly, and no honest checker can. Contrast is measured between two solid colors; a color at 60 percent alpha has a different luminance over white than over a photograph. Composite it against its real background first and check the result.
Where do the palette colors come from when I drop a file?
Every hex value, rgb() and hsl() in the text is pulled out with a pattern match and the duplicates dropped. It does not understand your stylesheet, so a color built from a variable at runtime will not appear, and a hex string that is not a color at all, such as a commit hash, might.
Is the image I drop uploaded anywhere?
No. It is decoded by the browser, drawn onto a canvas no larger than 160 pixels on its long side, and counted. Nothing leaves the tab, and the page works with the network switched off.
Why show the pair through color blindness at all?
Because a pass that rests on hue is not a pass. The three panels show the pair as the common kinds of color blindness would see it, so a pair that separates by hue and not by lightness gives itself away.
Who can see your file
| Who | Can they see it? |
|---|---|
| You | Yes |
| OBSCURA OS | No. Your file never reaches us. |
| Someone who breaks into our servers | No. Your file is not there. |
| Advertisers or partners | No. |
| Anyone using your unlocked computer, or a harmful browser extension | Yes. Keep your device and browser clean. |
Doing this often? OBSCURA Vector draws with the colors you checked, on artboards, out as SVG, PDF or PNG. Everything is US$5 a month or US$48 a year.