I would like to specify a background color in the alert environment. I can, for example, use
\setbeamercolor{alerted text}{fg=blue}
to change the colour of the alterted text to blue, but this
\setbeamercolor{alerted text}{bg=blue}
does not work. Is there a way to get around this?
I find that the font colours that the alert environment makes are too subtle and I'd like to add a coloured highlight box around my text in addition to changing the fg colour.
Best Answer
Since (La)TeX doesn't have a “background color” for text, you would have to put your text inside a box which you can then color. Consider the following example using
\colorbox
.Which renders
Edit: I'm no expert in beamer internals, so the following is nothing more than a hack. However, if you would like
\boxalert
to work with overlays, something like the following “seems” to work: