[Tex/LaTex] How to construct a coloured box with rounded corners

boxescolor

Here is the specs of the box.

  1. Color of the bar rule should be:

    \definecolor{mycolor}{rgb}{0.122, 0.435, 0.698}
    
  2. Radius of the 4 corners of the box: 4pt

  3. Thick line = 0.5pt
  4. Text should be 6pt indention on all sides

Best Answer

Have a look at the mdframed package:

\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}

\definecolor{mycolor}{rgb}{0.122, 0.435, 0.698}

\newmdenv[innerlinewidth=0.5pt, roundcorner=4pt,linecolor=mycolor,innerleftmargin=6pt,
innerrightmargin=6pt,innertopmargin=6pt,innerbottommargin=6pt]{mybox}

\begin{document}

\lipsum[2]
\begin{mybox}
\lipsum[4]
\end{mybox}
\lipsum[2]

\end{document}

enter image description here