Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have looked at the various beamer themes and I like CambridgeUS except for one very small aspect. I would like the titles of each block to have a colored background. Is there a simple way to do this?

In case that is not clear, what I mean is when I type in something like

\begin{Theorem}
   blah blah blah
\end{Theorem}

or

\begin{block}{Theorem}
    blah blah blah
\end{block}

it brings up a box that has a title Theorem and then has blah blah blah below that. In many themes, the top line of this box has a background color (and it is inside this first line where the word Theorem appears) and then the rest of that box is gray usually and that is where the text of the Theorem appear.

CambridgeUS does not have this though. Instead, the entire box that shows up is gray, including the top line that says Theorem. There are many other aspects of CambridgeUS that are exactly what I'm looking for but I just want that one line to have a color, and I am hoping there is some command for this.

share|improve this question
    
Do you think you can find a picture of what you want here so we will know exactly what you mean? –  Vivi Dec 9 '12 at 2:33
    
@vivi Let me try to describe it better in the question. –  Graphth Dec 9 '12 at 2:35
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  henrique Dec 9 '12 at 2:36
add comment

1 Answer

up vote 4 down vote accepted

You can customize the block title color and choose the foreground (fg) and background (bg) colors; a little example using some of the theme colors (you can, of course, use any colors you like):

\documentclass{beamer}
\usetheme{CambridgeUS}

\setbeamercolor{block title}{fg=gray!45!white,bg=darkred!80!black}

\begin{document}

\begin{frame}
\begin{Theorem}
Test
\end{Theorem}
\begin{block}{Theorem}
Test
\end{block}
\end{frame}

\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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