I would like to get the following colored boxes so that they are also slightly inclined. Here is a picture of what it should look like enter image description here

Can someone tell me how to do this with latex? Which packages do you have to use for this? Thank you in advance

2 Answers 2


You can use tcolorbox:

enter image description here


    frame hidden,
    tikz={rotate=#1,transform shape},
    fuzzy shadow={0mm}{0pt}{-.5pt}{1pt}{blue!90!white},


\mybox{15}{red!40}{$f_1(x) = x^4 - 3x^2 + 1$}
\mybox{-10}{yellow!40}{$f_2(x) = x^2 - 3$}


The solution by @user187803 using tcolorbox is probably the right way to do this, especially is you want the fuzzy shadow. For variety, here is a TikZ solution using drop shadow.

enter image description here

\usepackage[dvipsnames]{xcolor} is unnecessary, but allows the use of fun color names.



\newcommand{\colbox}[3]{\tikz{\node[fill=#1,rotate=#2,inner sep=2mm,
    drop shadow]{$#3$}}}





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.