0

This question already has an answer here:

Suppose I have a block like this:

\begin{block}{My awesome block}
It really is awesome! It has a header and a body, both areas filled with fancy colors!
\end{block}

I want to use the background color of the block's body (that is, the area of the block, not the text within the block) OUTSIDE the block, because it's such a nice one. I know I can get the beamer color of any element by

\usebeamercolor[bg]{block}

however, using this I get white for the background and black for the foreground...which are probably the colors for the text within the block, but not the colors of the block structure itself.

marked as duplicate by Claudio Fiandrino, barbara beeton, Peter Jansson, Werner, Jesse Mar 20 '14 at 14:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Have a look to block body or block title template. – Claudio Fiandrino Mar 20 '14 at 11:43
  • Ok, thanks for this. But how can I use the block body background color outside of a block? – mort Mar 20 '14 at 11:54
  • 1
    You can exploit How to get actual values of colour theme colours in beamer?: after calling the \ccft{template}{x fg}{x bg} command you will have the two colors x fg and x bg to be used in, say \textcolor{x fg}{text}. – Claudio Fiandrino Mar 20 '14 at 12:02
  • That's sweet, thanks! Care to make an answer out of it? – mort Mar 20 '14 at 12:19
  • If that solved the problem, do you mind if we close this question as duplicate of the other one? – Claudio Fiandrino Mar 20 '14 at 12:20

Browse other questions tagged or ask your own question.