# How to get beamercolor for block? [duplicate]

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, JesseMar 20 '14 at 14:19

• Have a look to block body or block title template. – Claudio Fiandrino Mar 20 '14 at 11:43
• 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