Colours
Published on 30 Nov 2007Tags #LaTeX
This note allows you to colour text and insert coloured boxes into your document. See Generating PS/PDF Documents for a list of available drivers.
Document Layout
% ...
\usepackage[DRIVER]{color}
% ...
\begin{document}
% ...
\end{document}
Coloured Text
\color{COLOR}{Text}
Coloured Box
% without frame
\colorbox{BACKGROUND_COLOUR}{TEXT}
% with frame
\fcolorbox{FRAME_COLOUR}{BACKGROUND_COLOUR}{Text}
Page Colour
\pagecolor{COLOUR}
Defining Colours
\definecolor{NAME}{MODEL}{SPEC}
Model and specification (MODEL: SPEC
):
-
rgb
: comma separated list of three numbers in [0,1] -
cmyk
: comma separated list of four numbers in [0,1] -
gray
: single number in [0,1]
Feedback is always welcome! If you'd like to get in touch with me concerning the contents of this article, please use Twitter.