How we check colors

Every number on ColorLint's color, contrast, and palette pages comes from the same color engine that runs the tools. This page explains the methods once, so each color page can stay about its own color.

Contrast ratio

ColorLint uses the WCAG 2.2 contrast formula on the final 8-bit sRGB colors, the ones a screen really shows. Ratios are cut to two decimals and never rounded up: 4.49:1 fails where 4.5:1 is required.

LevelNeeds
AA, normal text4.5:1
AA, large text (24 px, or 18.66 px bold)3:1
AAA, normal text7:1
AAA, large text4.5:1
Interface parts (borders, icons, focus rings)3:1

APCA, a newer contrast method, is shown for information only, because WCAG 2.2 doesn't use it. Unlike the WCAG ratio, its value changes with which color is the text.

The APCA notes use the levels from the APCA readability guidelines: Lc 90 is preferred for body text, 75 is enough for body text, 60 for other content text, 45 for large text such as headings, 30 for placeholder or disabled text, and 15 for non-text decoration. On dark backgrounds APCA is often stricter than the WCAG ratio, which is why a pair can pass WCAG and still get a low APCA level.

Colors a screen can't show

Tailwind CSS v4 defines its colors in OKLCH, and some of them are more saturated than most screens can show. ColorLint checks the sRGB version that those screens display, and says so on the color's page.

The closest passing color

When a pair fails, ColorLint keeps the hue of the color it changes and moves only its lightness, both darker and lighter, until the pair reaches the exact level. The result with the smallest visible change comes first.

Shades from 50 to 950

Each scale has 11 steps at fixed OKLCH lightness levels. The color itself stays in the scale, at the step closest to its lightness, and the other steps keep its hue.

Harmonies

Complementary, analogous, triadic, and split-complementary harmonies turn the hue in OKLCH (by 180°, 30°, 120°, and 150° or 210°) and keep the lightness, with color strength limited to what a screen can show. A color close to gray gives gray harmonies.

Color-blind simulation

Protanopia, deuteranopia, and tritanopia use the Machado, Oliveira & Fernandes (2009) model at full strength; achromatopsia uses relative luminance. A simulation shows a likely result, not exactly what every person sees.

The color-blind confusion check compares a color with eight common status colors from Tailwind CSS v4 (red-600, orange-500, amber-500, green-600, emerald-600, blue-600, violet-600, and gray-500). It warns when two colors that look clearly different with normal vision look similar in the simulation.

Named colors

The named colors come from three lists: the 148 CSS color names, Tailwind CSS v4, and Material Design (2014). "Similar named colors" are the nearest colors from those lists.

"Matching colors in other lists" uses the same distance levels as the CSS Color Analyzer: near-identical, similar, or visibly different.

What the checks cover

ColorLint checks color contrast only. Passing pairs do not mean a page is accessible: size, focus order, labels, and many other things matter too.

ColorLint is made by Vivek Kumar. If you find a mistake on any page, email hello@colorlint.com and it will be corrected.