[Tex/LaTex] Invert Background and Text Colours across Whole Document with pdflatex

colorpdftex

When using pdflatex is there a simple way to invert the colors to give white text on a black background across the whole document? I'd like the colours to be inverted whilst I write and edit the document, and then to be able to switch back to black text on a white background for the final version

Best Answer

You can do this with the xcolor package.

\documentclass{article}
\usepackage{xcolor}

\pagecolor[rgb]{0.5,0.5,0.5}
\color[rgb]{1,1,1}
\begin{document}

Hello \clearpage World

\end{document}