[Tex/LaTex] remove Beamer block transition between title and body

beamer

The title and the body of the block have different background colors that have a smooth transition. I would like to get rid of that and have a well defined line there. How do I go about doing that?

After searching, the closest I could find it this thread but it is not clear what he's asking and am not sure if the solutions are the best way to go for putting them in the theme file.

Thanks.

MWE:

\documentclass{beamer}
\usecolortheme{rose}
\setbeamertemplate{blocks}[rounded][shadow=true]

\begin{document}
\begin{frame}
  \begin{block}{Title}
  Block stuff.
  \end{block}
\end{frame}
\end{document}

Best Answer

\beamerboxesrounded uses the bmb@transition shading to add color between the title and the body parts of blocks. Here's the original definition (found in the file beamerbaseboxes.sty):

\pgfdeclareverticalshading[lower.bg,upper.bg]{bmb@transition}{200cm}{%
  color(0pt)=(lower.bg); color(2pt)=(lower.bg); color(4pt)=(upper.bg)}

To have a solid color, instead of a shading, you can use the same color for all three components of the shading; something along these lines:

\documentclass{beamer}
\usecolortheme{rose}
\setbeamertemplate{blocks}[rounded][shadow=true]

\colorlet{separation rule}{structure!40}

\makeatletter
\pgfdeclareverticalshading[lower.bg,upper.bg]{bmb@transition}{200cm}{%
  color(0pt)=(separation rule); color(2pt)=(separation rule); color(4pt)=(separation rule)}
\makeatother

\begin{document}
\begin{frame}
  \begin{block}{Title}
  Block stuff.
  \end{block}
\end{frame}
\end{document}

enter image description here

Of course, use the color that best suits your needs.

Related Question