Why doesn't the following MWE change the color of the latter fill to red? How to fix?
Background: I am changing the structure color for my example frames and want all the tikzpictures within to use colors based on the structure color.
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}{My Default Structure Color Rectangle}
\begin{tikzpicture}
\draw [fill=structure] rectangle (2,2);
\end{tikzpicture}
\end{frame}
\setbeamercolor{structure}{fg=red}
\begin{frame}{My Red Rectangle}
\begin{tikzpicture}
\draw [fill=structure] rectangle (2,2);
\end{tikzpicture}
\end{frame}
\end{document}
\usebeamercolor
before actually use it, and you should specifystructure.fg
. See Accessing colors defined by a beamer color theme for a standalone tikzpicture. – Claudio Fiandrino Jan 5 '16 at 13:30fill=structure
not give an error? – Symbol 1 Jan 5 '16 at 20:00structure
is simply a color name, and TikZ can use such names (see On using beamer's colors in a Tikz picture. – Claudio Fiandrino Jan 5 '16 at 20:04beamerbasecolor.sty
there is\colorlet{structure}{structure.fg}
. This looks pretty unnecessary. – Symbol 1 Jan 5 '16 at 20:11