3

I'm trying to get a custom colour on the title part of a \block. The documentation is really dense and I can't quite get my head around it. So at the moment I have a \block that looks like enter image description here

just made with the code

\block{The title of a block}{

\lipsum[1]

}

and I basically want to change the colour of the background behind the title part of the block, but without changing the colour of every block on the page. I guess this is really simple but I can't fight my way through the documentation to be able to find a simple answer, any help is appreciated! Thanks :)

6

You can change the color inside a local scope

\documentclass{tikzposter} % See Section 3
\title{Title} \institute{Inst} % See Section 4.1
\author{Auth} \titlegraphic{Logo}
\usetheme{Basic} % See Section 5
\usepackage{lipsum}

\begin{document}
\maketitle % See Section 4.1
\block{BlocktitleA}{\lipsum[1]} % See Section 4.2
\begin{columns} % See Section 4.4
\column{0.3} % See Section 4.4
{%<--------- Start scope
   \colorlet{blocktitlebgcolor}{red} %<---- change color
   \block{BlocktitleB}{\lipsum[2]}
}%<--------- End scope
\column{0.7}
\block{BlocktitleC}{\lipsum[3]}
%\note{Notetext} % See Section 4.3
\end{columns}
\end{document}

enter image description here

2

The tikzposter documentation is quite short to read. See section 5.1 Setting the colors, you can read

The colors for the backgrounds of the blocks can also be defined. The background color of the title portion of the block may be set with blocktitlebgcolor and the background color of the portion of the block with the text is set by blockbodybgcolor. The text colors for the title and the block contents are set with blocktitlefgcolor and blockbodyfgcolor, respectively.

You can modify these colors using colorlet, for instance:

\colorlet{blocktitlebgcolor}{green}
  • Thanks, I just wasn't sure of the syntax but it makes sense now :) – H. Keen Mar 18 '15 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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