[Tex/LaTex] Background color for existing floats (e.g. w/o defining a new environment)


I'm trying to make all my figures (including caption) backgrounded with a decent color.

I already found these questions with some nice answers:

But all these answers have in common that they define some new environments or commands that need to be put inside the figures or replace the figures completly.

Is there a way to put a background color behind existing floats without having to change the content of these existing floats?

Best Answer

enter image description here



\def\@xfloat ##1[##2]{#1%
      \vbox \bgroup\aftergroup\egroup



\caption{yes no}

one two three

Related Question