Check colour contrast in PDF documents

12 January 2026

Hands hold a fan of colour samples above a work surface.
Illustrative photograph. Cropped and resized. Photo by Mayara Caroline Mombelli on Pexels. · Pexels License

Measure the text against the background directly behind it. A high-contrast body paragraph on white does not establish that a pale footnote is legible across a tinted photograph. Set the requirement for the text being tested and record the weakest relevant pair on the exported page.

Compare like with like

For a review using WCAG 2.2 success criterion 1.4.3, ordinary text needs a contrast ratio of at least 4.5:1 and large-scale text needs at least 3:1, subject to the criterion’s exceptions. Determine size and weight before choosing a threshold. A footnote is still meaningful text even though it uses a secondary style. W3C’s explanation of Contrast (Minimum)

Here is a calculated sRGB example for normal text. These are explicit colour pairs, not readings from an unnamed report.

Text and local backgroundCalculated ratioAgainst 4.5:1
Body text #333333 on white #FFFFFF12.63:1Above the threshold
Footnote #AAAAAA on image patch #4444444.19:1Below the threshold
Same footnote on image patch #BBBBBB1.21:1Below the threshold

The body result cannot compensate for the footnote. Nor would a reading taken from a dark corner of the photograph tell you the ratio beneath the words. Compare using the unrounded result when a measurement is close to the threshold.

Check the actual export after correction

Record the PDF revision, page, text size and weight, sampled foreground and background, measurement method and threshold. Inspect the full area behind the footnote, accounting for transparency or gradients. Avoid sampling softened edge pixels of anti-aliased glyphs as though they were the intended text colour.

Try moving the footnote onto a solid panel or changing its colour, export again and repeat the affected measurements. Keep the decision tied to that output. A pass for these text pairs does not by itself establish overall PDF accessibility.

Part of the Check which accessibility tags survive a PDF export guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).