6

I have a background image for one of my slides which is partially transparent. I'd like to set the background color for this slide to black, but it does not work.

Example:

\documentclass{beamer}

\begin{document}
{
\setbeamercolor{background canvas}{bg=black}
\setbeamertemplate{background canvas}{\includegraphics[height=\paperheight]{muon1.png}}
\begin{frame}[plain]
\end{frame}
}
\end{document}

muon1.png

  • Please, next time propose a complete MWE, from \documentclass to \end{document}. And if you can, provide a transparent image. This way will be easier to test your code and help you. – Ignasi Nov 26 '12 at 20:09
10

Simply use the background template for the image and background canvas for the black background:

\documentclass{beamer}

\begin{document}
{
\setbeamercolor{background canvas}{bg=black}
\setbeamertemplate{background}{\includegraphics[height=\paperheight]{muon1.png}}
\begin{frame}[plain]
\end{frame}
}
\end{document}

enter image description here

  • +1 A better solution than the one I proposed... ;-) – Paul Gaborit Nov 26 '12 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.