\:It is an {\I important and popular fact} that things are not always what
they seem. For instance, on the planet Earth, man had always assumed
that he was more intelligent than dolphins because he had achieved so
-much -- the wheel, New York, wars and so on -- whilst all the dolphins
+much -- the wheel, {\colorlocal\rgb{1 0 0}New York}, wars and so on -- whilst all the dolphins
had ever done was muck about in the water having a good time. But
-conversely, the dolphins had always believed that they were far more
+conversely, the \colorpush\rgb{0 0 1}dolphins\colorpop{} had always believed that they were far more
intelligent than man -- for precisely the same reasons.
\:Curiously enough, the dolphins had long known of the impending
destruction of the of the planet Earth and had made many attempts to
%%% Colors %%%
+% Use of pdfTeX color stack:
+% \colorpush\rgb{1 0 0} puts a new color on the stack
+% \colorset\rgb{1 0 0} replaces the top color on the stack
+% \colorpop pops the top color
+% \colorlocal\rgb{1 0 0} set a color locally until the end of the current group
\chardef\colorstk=\pdfcolorstackinit page direct{0 g 0 G}
-\def\colorpush#1{\pdfcolorstack\colorstk push{#1 rg #1 RG}}
-\def\colorpushgray#1{\pdfcolorstack\colorstk push{#1 g #1 G}}
-\def\colorpushcmyk#1{\pdfcolorstack\colorstk push{#1 k #1 K}}
+\def\colorset#1{\pdfcolorstack\colorstk set #1}
+\def\colorpush#1{\pdfcolorstack\colorstk push #1}
\def\colorpop{\pdfcolorstack\colorstk pop}
+\def\colorlocal{\aftergroup\colorpop\colorpush}
+
+% Different ways of describing colors: \rgb{R G B}, \gray{G}, \cmyk{C M Y K}
+% (all components are real numbers between 0 and 1)
+\def\rgb#1{{#1 rg #1 RG}}
+\def\gray#1{{#1 g #1 G}}
+\def\cmyk#1{{#1 k #1 K}}
%%% Localization %%%