Markdown to PDF - dark-mode output
Dark-mode PDFs are the exception - most documents are read on white or printed. But for screen-only documents (decks, app docs, code snippets) the dark version can read better.
Why most PDFs aren't dark
PDFs are designed to print well, and dark backgrounds waste ink. They were designed to be read on white screens, where white-on-black is harder than black-on-white. The default is light for good reasons.
The cases where dark is the right call: decks shown in projection / dimmed rooms, code-heavy reference cards, app documentation that mirrors a dark UI.
Today's workaround
- Export the document with a normal light design.
- Open the PDF in a tool with colour-inversion (Preview on macOS, or Adobe Acrobat).
- Apply Smart Invert / Colour Invert on the document.
- Re-save.
What's coming
A 'dark' variant per design (balandir-dark, aplle-dark, etc.) is on the roadmap. The hard part is making sure the syntax-highlight palette in code blocks reads correctly on dark - most light-mode palettes look bad inverted.
FAQ
Will dark-mode print correctly?
It will use a lot of ink and read worse than the light version. If a print is in scope, export light. If the document is screen-only, dark is fine.
What about a half-dark deck?
Some presentations alternate dark and light slides. PDFs don't natively mix. Export the dark slides and the light slides as two PDFs and merge.
Is there a high-contrast mode for accessibility?
Not yet. The default designs already use AA-passing contrast ratios; AAA-grade contrast (a stricter level) is an enhancement we can ship if there's demand.
Related
https://md2document.com/markdown-to-pdf-dark-mode/