# Different colors for itemize in blocks and outside, in Beamer?

I would like to obtain what I describe in the following MWE, that is the itemize symbol should be

• black outside blocks;
• blue in normal blocks;
• green in example blocks.

MWE:

\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{itemize}
\item Here in blue, I'd like it in black.
\end{itemize}
\begin{block}{A block}
\begin{itemize}
\item Here in blue, I'd like keep it in blue.
\end{itemize}
\end{block}
\begin{itemize}
\item Here in red, I'd like keep it in red.
\end{itemize}
\begin{exampleblock}{An example block}
\begin{itemize}
\item Here in green, I'd like keep it in green.
\end{itemize}
\end{exampleblock}
\end{frame}
\end{document}


If I look to beamercolorthemedefault.sty, I see that items are colored using the local structure color:

• If I change the local structure to black, normal blocks become black;
• If I change directly the item color to black, it is black in all blocks.

So what is the correct way to obtain the desired result?

I would set the colour of local structure to black for normal text, then change it to match the colour of structure again when you start a normal block. This can be done by adding the redefinition of the colour to the beamer templateblock begin:

\documentclass{beamer}

\setbeamercolor{local structure}{parent=normal text}

\begin{document}
\begin{frame}
\begin{itemize}
\item Here in blue, I'd like it in black.
\end{itemize}
\begin{block}{A block}
\begin{itemize}
\item Here in blue, I'd like keep it in blue.
\end{itemize}
\end{block}
\begin{itemize}
\item Here in red, I'd like keep it in red.
\end{itemize}
\begin{exampleblock}{An example block}
\begin{itemize}
\item Here in green, I'd like keep it in green.
\end{itemize}
\end{exampleblock}
\end{frame}
\end{document}


One possibility is to set the itemize item color to black. This will affect all of the itemize environments, but then with the help of the etoolbox package you can restore the desired colors inside the blocks:

\usepackage{etoolbox}
\setbeamercolor{itemize item}{fg=black}
\AtBeginEnvironment{block}{\setbeamercolor{itemize item}{fg=structure}}
\AtBeginEnvironment{exampleblock}{\setbeamercolor{itemize item}{fg=block title example.fg}}


A complete example:

\documentclass{beamer}
\usepackage{etoolbox}

\setbeamercolor{itemize item}{fg=black}
\AtBeginEnvironment{block}{\setbeamercolor{itemize item}{fg=structure}}
\AtBeginEnvironment{exampleblock}{\setbeamercolor{itemize item}{fg=block title example.fg}}

\begin{document}
\begin{frame}
\begin{itemize}
\item Here in black, as desired.
\end{itemize}
\begin{block}{A block}
\begin{itemize}
\item Here in blue, I'd like keep it in blue.
\end{itemize}
\end{block}