Colour and ink / How the ink lands
White type on a coloured panel that stays readable on paper
Text knocked out of a solid colour so the paper shows through it, which is the most fragile way to set type in print and the most common on screen.
What actually happens
Reversed type is not ink on paper, it is the absence of ink in the shape of a letter. Two things then work against it. Ink spreads slightly as it is absorbed, so the gap that forms each letter closes a little, and thin strokes and small counters fill in. And where the panel is made of more than one ink, any registration shift moves the edge of one colour into the gap, so the letter picks up a coloured halo on one side. The result is that reversed type needs to be larger, heavier and more open than the same text set positively, and a design that reverses 8 point text out of a four-colour panel is unreadable on paper while looking perfectly fine on the screen it was designed on.
Where this API stands on colour
This API renders HTML to PDF, and the colour in the output is the colour in your CSS, which is RGB. There is no colour-space option, no CMYK mode, no ICC embedding, no ink-limit control and no greyscale conversion. Two options touch colour at all and neither changes a colour value: print_background, which is on by default here and off by default in most renderers, decides whether backgrounds and background images are painted at all, and media decides whether your print stylesheet applies. Anything that converts this document into inks happens after the render, in a tool you choose, and that is where the decisions on this page are enforced.
The decisions that avoid it
Reasons rather than a description of the code. Each of these is a choice with a wrong answer, and the wrong answer usually looks correct on a screen.
- Set reversed type larger and heavier than you would positively. A weight that is comfortable in black on white is too light knocked out.
- Avoid typefaces with fine hairlines and tight counters for reversed text. A high-contrast display face loses its thin strokes entirely.
- Reverse out of a single ink where you can. A knockout from one colour has no registration to go wrong.
- Never reverse small text out of a photograph. The contrast varies across the letterforms and there is no value you can choose that works over the whole area.
- Remember that a knocked-out panel is a background, so it is the first thing to disappear when backgrounds are not printed, taking the white text with it and leaving nothing.
- Give the panel enough padding that no letter sits near the edge, where any shift in the panel position clips it.
In the stylesheet
Where the decision is expressible in CSS, this is what it looks like. Where it is not, the snippet says so rather than inventing a property.
.reversed {
background: #1d1812;
color: #ffffff;
/* larger and heavier than the same text would be positively */
font-size: 11pt;
font-weight: 600;
letter-spacing: 0.01em; /* opens the counters slightly */
padding: 6mm 7mm; /* nothing near the panel edge */
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
}
/* The fallback that matters: if the panel does not print, white text on
white paper is invisible. Give the block a dark text colour that only
applies when the background is gone. */
@media print {
.reversed { border: 1pt solid #1d1812; }
}What people do instead
Reversing type out of a panel and relying on the panel printing. Backgrounds are dropped by print settings routinely, and when the panel goes the white text goes with it, leaving a blank rectangle where the most emphasised content on the page was. Every other failure in this document is a legibility problem; this one is total.
How to find out rather than assume
Print the page twice, once with backgrounds on and once off. With them on, read the smallest reversed text at arm's length. With them off, confirm the content is still present in some form rather than invisible. If the second print shows a gap, the design depends on something it cannot depend on.
Frequently asked
Can I ask the API for CMYK output?
No. There is no colour-space option on the render, and the document comes out in RGB. Converting to CMYK is a downstream step: a preflight tool or a converter rewrites the colour against a profile you choose, and that is also where an output intent and an ink-coverage check belong. Convert after rendering rather than trying to reach the conversion from a stylesheet.
Will my backgrounds and tints print?
From this API they are painted into the document by default, because print_background defaults to true here rather than to false. What happens afterwards is the reader's print settings, and a viewer told not to print backgrounds will still drop them. That is why every page in this cluster treats a background as an enhancement rather than as the thing carrying the meaning.
Does any of this apply to a document that is only ever read on screen?
Very little of it. Dot gain, ink coverage, registration and paper are properties of a physical process. If the document is genuinely never printed, photocopied or faxed, most of this cluster is not your problem. The reason it is worth reading anyway is that people are consistently wrong about which of their documents get printed.
Related colour and ink topics
The topics that cause each other, then the rest of the same group.
Rich black against 100% K, and why body text uses one of them
Two different blacks that look identical on screen and behave completely differently on paper: one made from black ink alone, one made by adding the other three inks underneath it.
Thin rules that vanish or thicken between screen and paper
Rules and borders specified below the width the output device can actually draw, which come out either heavier than asked or not at all.
Designing a document that survives being photocopied and faxed
What a document has to be like to still work after it has been through a copier, a scanner or a fax, which is where most operational documents end up.
Total ink coverage, and the panel that will not dry
The sum of all the ink percentages laid in one place, which has a physical ceiling that a colour chosen on a screen knows nothing about.
print-color-adjust in paged output
The property involved here, with its real support status.
Every colour and ink topic
The full list, grouped by whether it happens in the ink, in a conversion, or at the device.
Everything on this page is decided in your stylesheet or at the printer. Render the document, then put it on the paper it will actually be printed on.