I'd like to automatically change the color of the text according to the background color.
I've used tikz
to create the background (the shape is only an example) but any other way to do it is welcome.
\documentclass{beamer}
\usepackage{tikz}
\usetheme{Madrid}
\usebackgroundtemplate{%
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (0,\paperheight);
\coordinate (C) at (\paperwidth,0);
\fill[blue] (A) -- (C) -- (B) -- cycle;
\end{tikzpicture}
}
\begin{document}
\begin{frame}
\frametitle{Example}
Could this text be automatically white on blue and blue on white?
\end{frame}
\end{document}
tikz
.