22.3.1 Define colors

Synopsis:

\definecolor{name}{model}{specification}

Give the name name to the color. For example, after this

\definecolor{silver}{rgb}{0.75,0.75,0.74}

you can use that color name with Hi ho, \textcolor{silver}{Silver}!.

This example gives the color a more abstract name, so it could change and not be misleading.

\definecolor{logocolor}{RGB}{145,92,131}    % RGB needs pdflatex
\newcommand{\logo}{\textcolor{logocolor}{Bob's Big Bagels}}

Often a document’s colors are defined in the preamble, or in the class or style, rather than in the document body.


Unofficial LaTeX2e reference manual