New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block background color #193
Comments
You are not mistaken, that's right.
Do you mean something like this? Probably not, because that doesn't look good at all (imho). Could you make an example what you mean? You just have to set the colors manually after loading the theme with \setbeamercolor{block title alerted}{ ... }
\setbeamercolor{block body alerted}{ ... } for the alerted block and can then post a picture here. But either way, I think it is a good decision to use the same background color for all blocks. In my opinion too much color is too distracting. |
I expect @alcarazr is proposing something along the lines of the Beamer colour themes I think this and the current design look equally good and do not have strong opinions on the matter. Having more colour can be distracting sometimes (I tend to feel this way about example blocks) but it can also help focus the audience's attention to an important part of the slide (most common with alert blocks). I would not object to either changing it or keeping the same. But either way, it's a design choice worth considering. (Thanks for the suggestion, @alcarazr!) @matze, @benjamin-weiss, what do you think? |
A full color conversion would actually look more like this (code below image): \documentclass{beamer}
\usetheme{metropolis}
% Colors based on Paul Tol's recommendations for marking text (https://personal.sron.nl/~pault/#textmarking)
\definecolor{BlueTOL}{HTML}{222255}
\definecolor{BrownTOL}{HTML}{666633}
\definecolor{GreenTOL}{HTML}{225522}
\setbeamercolor{normal text}{fg=BlueTOL,bg=white}
\setbeamercolor{alerted text}{fg=BrownTOL}
\setbeamercolor{example text}{fg=GreenTOL}
\setbeamercolor{block title alerted}{use=alerted text,
fg=alerted text.fg,
bg=}
\setbeamercolor{block body alerted}{use={block title alerted, alerted text},
fg=alerted text.fg,
bg=}
\setbeamercolor{block title example}{use=example text,
fg=example text.fg,
bg=}
\setbeamercolor{block body example}{use={block title example, example text},
fg=example text.fg,
bg=}
\begin{document}
\begin{frame}{Blocks}
Three different block environments are pre-defined and may be styled with an
optional background color.
\begin{columns}[T,onlytextwidth]
\column{0.5\textwidth}
\begin{block}{Default}
Block content.
\end{block}
\begin{alertblock}{Alert}
Block content.
\end{alertblock}
\begin{exampleblock}{Example}
Block content.
\end{exampleblock}
\column{0.5\textwidth}
\metroset{block=fill}
\setbeamercolor{block title alerted}{use=alerted text,
fg=alerted text.fg,
bg=alerted text.bg!80!alerted text.fg}
\setbeamercolor{block body alerted}{use={block title alerted, alerted text},
fg=alerted text.fg,
bg=block title alerted.bg!50!alerted text.bg}
\setbeamercolor{block title example}{use=example text,
fg=example text.fg,
bg=example text.bg!80!example text.fg}
\setbeamercolor{block body example}{use={block title example, example text},
fg=example text.fg,
bg=block title example.bg!50!example text.bg}
\begin{block}{Default}
Block content.
\end{block}
\begin{alertblock}{Alert}
Block content.
\end{alertblock}
\begin{exampleblock}{Example}
Block content.
\end{exampleblock}
\end{columns}
\end{frame}
\end{document} In this example I have used Paul Tol's recommendations for marking text. I agree too much color may be distracting, but at the same time if you do not want it, just use normal blocks all the time. |
Tough decision, I actually prefer Ross' suggestion because it provides good contrast but does not clash as hard as Benjamin's implementation. The full color conversion inhibits readability in my opinion. By the way, as far as I can see Paul Tol's notes address coloring data for visualization purposes, so in the context of typesetting text and beamer slides in particular we should take his advice with a grain of salt. |
I think so too.
As I wrote earlier, I would really like to keep the current implementation. So why not just add a third option. E. g. |
Given that the colors can be easily changed after loading the package, I would say the best option is leaving it to the user, keeping the current implementation. A third option as suggested by @benjamin-weiss implies making a design decisión as well. |
Sounds like the consensus is to keep the current design as-is! I agree that it's probably best to expect the user to use If everyone is fine with that, I guess we can close this issue. Thanks again to @alcarazr for prompting the discussion! |
Alright. |
Hi,
if I am not mistaken, currently all three block types share the same background color, which is based on the
normal text
color (bothfg
andbg
).Have you considered setting the background color depending on the block type (depending on the
alerted
andexample
fg
colors, respectively)?Thanks,
The text was updated successfully, but these errors were encountered: