Pikkola Colour Lab, tool No. 55

Contrast is a number you can check.

Put a text colour and a background colour in. The page measures them against WCAG 2.2 and APCA, shows what passes at 4.5:1 and what only passes at 3:1 in large type, and when a pair falls short it moves one colour's lightness the shortest distance that clears the line.

6
checks per pair
2
standards, WCAG and APCA
0
requests sent

The pair

Two colours, six verdicts

Type a value in any of the four notations, or use the picker. Every check below recalculates as you type, and nothing is sent anywhere.

Foreground
#1F2326
Background
#F6F4EE

Verdict

13.28:1

WCAG 2.2

Lc 93

body text, preferred

  • AA normal text4.5:1pass
  • AA large text3:1pass
  • AAA normal text7:1pass
  • AAA large text4.5:1pass
  • UI and borders3:1pass
On the page

A headline at 32px

Body copy at 16px, which is where most of a page is read. If this line is hard work, no other check will save it.

Caption at 12px, the size that fails first

A link in the same colour

Button label

Sizes are CSS pixels. Large text starts at 24px, or 18.66px when bold.

Short of the line

The fix keeps the hue and the chroma, changes only OKLCH lightness, and stops at the first step that meets the target.

Six pairs

Pairs that show the line

Each card is a real pairing with its measured ratio. Open one to load both colours into the studio.

The palette

Every pair, all at once

Five colours by default, eight at most. The matrix is the whole set measured against itself, so the pair you did not think to check shows up.

Colour vision
Colour vision
    Pair matrix
    Contrast ratio of each row colour on each column colour

    The simulation uses the Machado matrices at full severity. Achromatopsia is luminance only.

    Variables carry the simulated values when a simulation is on, so a palette checked for deuteranopia can be shipped as checked.

    
          

    How to read it

    Two standards, two different questions

    WCAG asks whether a pair reaches a fixed ratio. APCA asks how much lightness contrast a reader actually perceives at that polarity. A pair can pass one and miss the other, and that is worth knowing.

    01

    The ratio is arithmetic

    Relative luminance weights green most and blue least, then the ratio is (lighter + 0.05) / (darker + 0.05). It runs from 1:1 to 21:1 and never depends on hue. Two colours with the same luminance have the same ratio whatever they look like.

    02

    Size changes the target

    WCAG asks 4.5:1 for normal text and 3:1 for large text, borders and focus rings. Large means 24px, or 18.66px when bold. AAA doubles the normal target to 7:1. A pair that fails normal text can still be a correct choice for a headline.

    03

    APCA reads direction

    APCA returns Lc from 0 to about 106, and the sign says which way round the pair is: dark text on light is positive, light on dark is negative. Near the middle of the range the two directions are not equivalent, which the fixed ratio cannot express.

    WCAG 2.2 minimum ratios
    What AA AAA
    Normal text 4.5:1 7:1
    Large text, 24px or 18.66px bold 3:1 4.5:1
    UI components, borders, focus 3:1 no target
    APCA Lc against use
    Use Lc
    Body text, preferred90
    Body text, minimum75
    Content text, minimum60
    Large or bold text, minimum45
    Large bold text, non-essential30
    UI components and borders15

    The bands are APCA's own guidance for 400 weight text on a self-lit screen. Absolute Lc matters: -75 is as strong as +75.

    Questions

    Why does a colour that looks fine measure 3.9:1?

    Because the eye is not a light meter. The ratio is built on relative luminance, and the eye adapts to the surface it is reading on, so a mid grey can look perfectly readable on a white screen in a bright room and be unreadable on the same screen at night. The number is a floor, not a description of what you see.

    Should I use WCAG or APCA?

    For a legal or procurement requirement, WCAG 2.2 is what will be audited. APCA is the better model of perception and is what WCAG 3 is being written around, but it has no compliance threshold yet. Use WCAG to pass, APCA to judge, and treat a wide gap between them as a reason to look at the pair again.

    Is the lightness fix changing my brand colour?

    It changes one attribute of it. The hue and the chroma stay, OKLCH lightness moves, and it stops at the first step that meets the target instead of jumping to black or white. If the result is no longer your colour, the honest answer is that the pair was wrong, not the fix.

    Why does the fix only touch the foreground?

    Because that is the colour you usually own: text sits on a surface that a design system or a photograph decides. If the background is the free one, swap the pair, fix, and swap back. The buttons measure both directions and take the shorter one inside the colour they are allowed to move.

    What do the four simulations actually do?

    They apply the Machado, Oliveira and Fernandes matrices at full severity to the linear values, which is the standard way to approximate dichromacy. Achromatopsia keeps luminance only. They approximate: real colour vision varies within each type, and no simulation replaces testing with people.

    Does anything leave the browser?

    No. The colours, the palette and the exports are computed in this tab, the content policy sets connect-src to none, and the only thing kept is your language, your theme and the last palette in this browser.