My question concerns itemize item
s in Beamer
slides. I want to obtain the following slide:
This has been produced by the code:
\documentclass{beamer}
\begin{document}
\begin{frame}{Title}
\begin{itemize}
\setbeamercolor{local structure}{fg=red}
\item \textcolor{red}{Red}, other text
\setbeamercolor{local structure}{fg=green}
\item \textcolor{green}{Green}, other text
\setbeamercolor{local structure}{fg=blue}
\item \textcolor{blue}{Blue}, other text
\end{itemize}
\end{frame}
\end{document}
Question. Is there a way to define a command \coloreditem{<color>}
so that the above slide can be defined by the simplified code that follows?
\begin{frame}{Title}
\begin{itemize}
\coloreditem{red} \textcolor{red}{Red}, other text
\coloreditem{green} \textcolor{green}{Green}, other text
\item \textcolor{blue}{Blue}, other text
\end{itemize}
\end{frame}
My first guess was to define
\newcommand\coloreditem[1]{\setbeamercolor{local structure}{fg=#1}\item}
but of course the local structure get changed for too long. And adding a new pair of {}
does not work.
\item
s.