[Tex/LaTex] How to change the colour back to the original following \color

color

I have this command set up: \newcommand\blue[1]{{\color{blue}#1}}

In my document, I use \color{blue}.

Then I'd like to change the colour back to the original. Is there a way I can do this without

  1. scoping the \color{blue} or
  2. hardcoding the colour \color{black}.

Best Answer

\documentclass{article}

\usepackage{color}
\makeatletter
\def\zz{\edef\zzz{\pdfliteral{\current@color}}}%pdftex version
\makeatother
\begin{document}


\color{green}\zz one two \color{blue} three four \zzz five

\end{document}