CH6 Open standards and accessibility · 2026 – now

Colour themes for PDF

One PDF that carries its author's own light, dark or higher-contrast themes.

size for all 8 themes
+5.0%
standard themes
8

What I did

I built the proof of concept for a proposal to the PDF Association, with a live demo.

Result

A reader that supports themes swaps a small palette instead of inverting the page. Other readers show the page exactly as now.

One file carries every theme its author built. Each theme's colours sit in a small palette.

Eight thumbnails of the same test page, four across in two rows: Light on white, Dark on near-black, Light more contrast on white, Dark more contrast on black, then Cream, Peach, Yellow and Turquoise tinted pages. Each page has the heading Theme test page, a line chart with three channels, a bar chart and a colour gradient picture. The lines, bars and text change colour to suit each background.
The test page in all 8 standard themes. Light and Dark are the author's own builds. The tool worked out the other six from them.

How it works

How a themed file is made and read. The builds may differ only in colour and pictures.

Measured

File size of the theme lab, a one-page Typst document of plots built once per theme. One file with all 8 themes is 5.0% bigger than the light build alone.
The lowest text contrast in each theme on the test page. The tick is the theme's target.
PDF engines draw each theme like its own build, pixel for pixel: Poppler, MuPDF and PDFium
3
added to a scanned page for all 8 themes, 3.6% of its size
4,755 bytes

Who each theme is for

The standard themes

themeText contrastWho it's for
Light4.5:1The author's design.
Dark4.5:1Light sensitivity, glare, reading at night, some low vision.
Light, more contrast7:1Low vision.
Dark, more contrast7:1Low vision with light sensitivity.
Cream, Peach, Yellow, Turquoise4.5:1Many readers with dyslexia or visual stress find a tinted background easier.

The targets are for body text. Large text may go down to 4.5:1 in the more-contrast themes, or 3:1 in the rest. Each theme's text contrast is measured before it goes in the file.

More detail

Why I built it

PDF readers that offer a dark mode make it up themselves. They invert the page or swap its colours, which spoils charts. Readers who need more contrast or a tinted background get the same treatment. The file has no way to say how it should look in the dark, so I built one. My own CV is a tagged, accessible PDF, so this felt like the next step.

Skills

  • PDF
  • accessibility
  • open standards
  • Typst

Proof