Enable transparent background of beamercolorbox #884
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am working on a beamer theme right now and found myself wanting colorboxes with truly transparent backgrounds. I found a stackexchange post addressing this topic and then noticed that implementing this as a proper parameter
bgopacity
forbeamercolorbox
andbeamerboxesrounded
does not seem too hard.The result is cleanest for non-rounded boxes, as they are drawn as one shape.
For rounded boxes, especially with a heading, the box can sometimes get tiny gaps, as the shapes can't overlap with transparent background colours.
I made sure that the shapes still overlap when no transparency is used, so that the gaps don't appear in this case.
Here is an example of what I get with my code.
The LaTeX code to generate the example above
The implementation is based on this stackexchange post and I made the following additional modifications:
rounded=false
: the stackexchange post only made modifications tobeamerboxesrounded
, not to non-rounded boxes that are drawn directly inbeamercolorbox
bgopacity=1
: in order to make sure I'm not messing anything up, pretty much all changes are guarded byif bgtransparency != 1
(looking through the theme examples in the userguide, they all still look fine to me)