Avec https://tex.stackexchange.com/a/573099/36296 :
\documentclass{minimal}
\usepackage{xcolor}
\begin{document}
\def\vert#1{{\color{green}#1}}
\def\rouge#1{\textcolor{red}{\renewcommand\color[2][]{}#1}}
\def\rouge#1{{\color{red}\renewcommand\color[2][]{}#1}}
\rouge{\vert{a}}
\end{document}