3

Why it is useful to define some colors in the outer theme?

example:

\setbeamercolor*{date in head/foot}{parent=palette primary}

Could it also be in the colourtheme?

  • It could be anywhere you like, even in the document itself. It is just customary to put the colour definitions in the colour theme and its make searching in foreign themes easier. – user36296 May 31 '16 at 8:16
  • Thank you for your quick resonse, but why use the new assignment at all. I can directly set the beamercolorbox to palette primary... – C.Doe May 31 '16 at 8:50
  • yes, but imagine you are creating a theme, then your are more flexible if you define \setbeamercolor*{date in head/foot}{parent=palette primary}. Imagine you give the theme to your colleague, he likes the colours with one exception: he wants the date in a different colour. He can simply change this one line and does not have to dig through your code until he finds the definition of the beamercolorbox – user36296 May 31 '16 at 9:17
2

As far as I understand, beamer colours can be defined everywhere. Whether in the colour theme, the outer theme or even the beamer documents itself, does not matter from a technical point of view, if you define the colours only once. If you define a colour multiple times the situation is more complicate and you have to pay attention if you define it in the document or in the theme.

BUT: it is customary to place colour definitions mainly in the colour theme. This helps you to keep your theme organised and it helps others to find relevant lines they like to change.


Now to why you should use colour definitions like \setbeamercolor*{date in head/foot}{parent=palette primary} at all and not just use \begin{beamercolorbox}{palette primary}. This makes your code much more flexible. Imagine you create at theme and give it to your colleague. He likes your colours, but with one exception: he wants the date in a different colour. He can simply

  • search your code for a meaningful phrase like "date" and will find the line (palette primary is not very intuitive to search for and will give many hits)
  • just look at the normally relatively short and clear colour theme and find a simple line (while \begin{beamercolorbox} is normally surround by more complex code)

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.