0

First of all im thanking y'all for your time and patience with a Latex Beginner. Im currently working on a template for a presentation in Latex Beamer.

My question is: Does anyone know how to get of this color transitioning effect between the body and title of a beamer block?

What i started with (problem hasnt occured): enter image description here

The problem occurs when im changing the standard settings form "normal" to rounded corners:

(I also marked the effect to make it more understandable.)

enter image description here

Im not using any themes. Everything from scratch. I only used the following code to change some colors. And i added the rounded color effect (only second pic).

% Beamerboxes color
%Standard boxes
\setbeamercolor{block title}{use=structure,fg=beetle_color.fg,bg=beetle_color.bg}
\setbeamercolor{block body}{use=structure,fg=beetle_color.bg,bg=beetle_color.bg!5!white}

%Examplebox
\setbeamercolor{block title example}{use=structure,fg=beetle_color.fg,bg=OliveGreen}
\setbeamercolor{block body example}{use=structure,fg=beetle_color.bg,bg=OliveGreen!20!white}

%Alertbox
\setbeamercolor{block title alerted}{use=structure,fg=beetle_color.fg,bg=Maroon}
\setbeamercolor{block body alerted}{use=structure,fg=beetle_color.bg,bg=Maroon!20!white}

\setbeamertemplate{blocks}[rounded]
3
  • And another simple question is: What does use = structure actually mean? The color changing works perfectly without this part, but i found it online and just kept it Oct 3 at 16:16
  • Please don't post code fragments. Always make a small, but compilable example so people here don't have to fix all the errors about undefined colours etc. Oct 3 at 16:29
  • Thank you very much exactly what i wanted. Ok noticed for future questions Oct 3 at 16:39

1 Answer 1

2

You could use the tcolorbox inner beamer theme. This will replace normal beamer block with tcolorboxes and comes with options to control if or if not the colour shading between the title and the body should be shown:

\documentclass[xcolor={svgnames}]{beamer}

\setbeamercolor{beetle_color}{fg=white,bg=DarkRed}
\usebeamercolor{beetle_color}

% Beamerboxes color
%Standard boxes
\setbeamercolor{block title}{fg=beetle_color.fg,bg=beetle_color.bg}
\setbeamercolor{block body}{fg=beetle_color.bg,bg=beetle_color.bg!5!white}

%Examplebox
\setbeamercolor{block title example}{fg=beetle_color.fg,bg=OliveGreen}
\setbeamercolor{block body example}{fg=beetle_color.bg,bg=OliveGreen!20!white}

%Alertbox
\setbeamercolor{block title alerted}{fg=beetle_color.fg,bg=Maroon}
\setbeamercolor{block body alerted}{fg=beetle_color.bg,bg=Maroon!20!white}


\useinnertheme[rounded,shaded=false]{tcolorbox}

\begin{document}

\begin{frame}
  \begin{block}{Test}
  content...
  \end{block}
\end{frame}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .