Guide
How to check colour contrast in a PDF
No PDF checker measures contrast — it is on every checklist and no tool decides it. How to measure it properly, and what the ratios actually require.
About 9 minutes · moderate
The gap nobody mentions
Contrast is on every document accessibility checklist. No PDF checker measures it. veraPDF does not, PAC does not, Acrobat’s checker does not, and Taggart does not either.
This is not an oversight. PDF/UA — ISO 14289-1 — contains no contrast requirement. Contrast is a WCAG criterion, and it reaches PDFs through the legal instruments that point at WCAG: Section 508, EN 301 549, ADA Title II, the EAA, IS 5568.
So a document can pass every automated PDF/UA check and be illegible. Contrast is a human check, every time.
What the numbers require
| Content | Level AA | Level AAA |
|---|---|---|
| Body text | 4.5:1 | 7:1 |
| Large text — 18pt, or 14pt bold | 3:1 | 4.5:1 |
| Non-text: icons, chart lines, field borders | 3:1 | 3:1 |
Exempt: logos, purely decorative text, text that is part of a photograph, and text in a disabled control.
Two points where documents differ from web pages:
18pt is bigger than it sounds. Most body text in a report is 10–11pt. Headings are often 14pt regular, which is not large text — 14pt qualifies only when bold.
Print loses contrast. A ratio that is comfortable on a backlit monitor is thinner on paper and thinner again on a photocopy. For a document that will be printed, treat 4.5:1 as the floor rather than the target.
Measuring it
There is no shortcut here; you sample colours and compute the ratio.
The quickest reliable method is a screen colour picker plus a contrast calculator: the Colour Contrast Analyser from TPGi is free on Windows and macOS, has an eyedropper, and reads the ratio live as you move it.
- Open the PDF at 100% or larger — antialiasing at small sizes samples blended pixels and gives you a wrong answer.
- Eyedropper the text colour. Sample the middle of a thick stroke, not an edge.
- Eyedropper the background immediately behind that text.
- Read the ratio.
From the source, which is more accurate. If you have the InDesign or Word file, read the swatch values rather than sampling pixels. #333333 on #FFFFFF is exactly 12.63:1; a sampled pixel of the same text may read #3A3A3A because of antialiasing.
In a script, if you are checking many documents:
def channel(c):
c /= 255
return c / 12.92 if c <= 0.03928 else ((c + 0.055) / 1.055) ** 2.4
def luminance(rgb):
r, g, b = (channel(c) for c in rgb)
return 0.2126 * r + 0.7152 * g + 0.0722 * b
def ratio(fg, bg):
a, b = luminance(fg), luminance(bg)
return (max(a, b) + 0.05) / (min(a, b) + 0.05)
ratio((0x33, 0x33, 0x33), (0xFF, 0xFF, 0xFF)) # 12.63
That is the WCAG formula verbatim. Extracting the actual fill colours from a content stream is the hard part; sampling rendered pixels is easier and good enough for a judgement call.
Where documents fail
Five patterns account for most of it.
Grey body text. #767676 is the lightest grey that passes on white, at 4.54:1. Designers reach for #999999 — 2.85:1 — because it looks refined. It is the most common contrast failure in professional documents.
Coloured text on a brand background. A corporate palette chosen for print collateral in 2011 was not checked against 4.5:1, and nobody has re-checked it since. Check the palette once and reuse the result.
Text over photographs. Passes on one part of the image and fails on another. Use a panel, a scrim, or move the text off the image.
Chart legends and axis labels. Almost always the smallest and lightest text in the document, and almost always carrying essential information.
Placeholder text in form fields. Grey by convention, and it frequently carries the format instruction, which makes it content rather than decoration.
Colour as the only signal
Separate from contrast, and separate from any checker: WCAG 1.4.1 says colour must not be the only way information is conveyed.
In documents this means:
- A chart whose series are distinguished only by colour needs patterns, direct labels or different markers.
- Red text for “overdue” and green for “paid” needs a word or a symbol as well.
- A form that marks required fields only by a red label needs the word “required” in the tooltip — see naming form fields.
- A “traffic light” status column needs the status written out.
This one is a judgement call and is worth making early, because it is a design change rather than a remediation step. Discovering it at the remediation stage means going back to the author, and going back to the author is where document projects stall.
What to record
Because no tool will produce this for you, the remediation report has to carry it as a human decision: which samples were taken, what they measured, and what was decided about the marginal cases.
“Body text #4A4A4A on #FFFFFF — 8.59:1, passes. Chart axis labels #A0A0A0 on #FFFFFF — 2.57:1, fails; referred to the author on 2026-09-08.” That is evidence. “Contrast checked ✓” is not.
Frequently asked questions
Why does no PDF checker report contrast?
Because measuring it means rasterising the page and deciding, per glyph, which pixels are text and which are background — and then deciding whether a given piece of text is decorative, a logo, or disabled, all of which are exempt. PDF/UA does not include a contrast requirement at all; contrast comes from WCAG, which applies to the document through Section 508, EN 301 549 and the rest.
What ratio do I actually need?
4.5:1 for body text and 3:1 for large text at Level AA. Large means 18pt, or 14pt bold. Level AAA raises those to 7:1 and 4.5:1. Non-text elements that convey information — chart lines, icons, form field borders — need 3:1 under 1.4.11.
Does a PDF that will be printed still need contrast?
Yes, and more so. Print loses contrast relative to a backlit screen, and a document of record gets photocopied. If it is marginal on your monitor it fails on paper.
What about text over an image?
It has to pass at its worst point, not its average. A caption over a photograph that passes on the dark half and fails on the light half fails. The reliable fix is a solid or semi-opaque panel behind the text.
Related failure conditions
- 13-004 Figure tag alternative or replacement text missing A Figure element has neither /Alt nor /ActualText. Every Figure must have one or the other; if the image is decorative it should be an artifact instead of a Figure.
- 09-001 Tags are not in logical reading order The order of elements in the structure tree does not match the order a human would read the page. This is the single most common substantive defect in tagged PDFs and the one Acrobat's own tooling handles worst.
Check your own file. Taggart's validator is free and unlimited — no page cap, no watermark, and no account at all up to 60 pages.
Last updated .