# Tikzposter: How to change the background of a \block?

I'm trying to obtain that the blocks on one half of the poster have, say, red background, and in the other half have, say, green background.

Is that possible?

Thanks

• Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – CarLaTeX Dec 9 '16 at 3:19
• Look up block styles on page 13 of the manual. – John Kormylo Dec 9 '16 at 4:31

## 1 Answer

The background color of the blocks is blockbodybgcolor, so you can simply redefine that colour as you see fit in your document, using \colorlet{blockbodybgcolor}{<colorname>}. Similarly, the background color of the block title is blocktitlebgcolor, so you can change that as well, if you wish.

\documentclass[a2paper]{tikzposter}
\author{D. Ude}
\title{FooBar}
\begin{document}
\maketitle
\block{A}{This has the default colour}

\colorlet{blockbodybgcolor}{green!60}
\block{B}{This is green}
{ % start a group to keep the change of title background color local
\colorlet{blocktitlebgcolor}{red!60}
\block{C}{As is this, but the title has red background}
} % end that group

\colorlet{blockbodybgcolor}{cyan}
\block{D}{This is cyan}
\end{document}