# How can I get sharp corners inside and rounded corners outside a tcolorbox?

So I would like to typeset a tcolorbox that has the following properties:

• Left border only
• Rounded corners
• Sharp corners just on interior directly to the right of left border.

I have tried the following:

\begin{tcolorbox}
[
toprule=0pt,
bottomrule=0pt,
rightrule=0pt,
leftrule=5pt,
colframe=blue
]
This is a tcolorbox!
\end{tcolorbox}


Unfortulately, I get the following output: Notice how there is a faint blue outline on the top, right and bottom sides of the box even though I have clearly told tcolorbox to draw them with thickness 0pt which technically means "invisible".

Additionally, notice how the top left and bottom right corners of the grey, interior portion of the box are not sharp.

Does anyone know how I can solve these problems? I've tried looking through the tcolorbox manual but I couldn't find what I was looking for. If your solution has a \newenvironment command, could you please thoroughly explain your code so as to minimise the number of questions under your answer?

Thanks!

• there are a number of options you can exercise as below Jul 11 '20 at 13:58

You can replace the frame code so that only the left border is drawn, which removes the artefacts and allows you to have the sharp internal corners:

\documentclass{article}

\usepackage[skins]{tcolorbox}

\newtcolorbox{blueleftbox}{%
enhanced,
boxrule=0pt,
leftrule=5pt,
sharp corners=west,
frame code={
\fill[blue]
([xshift=5pt]frame.north west) --
([xshift=5pt]frame.south west) --
([xshift=1mm]frame.south west) arc
([yshift=-1mm]frame.north west) arc
cycle;
}
}

\begin{document}

\begin{blueleftbox}
This is a tcolorbox!
\end{blueleftbox}

\end{document}


• Wau! Looks cool! I think I should take a closer look at using TikZ in tcolorboxes. Thank you so much! Jul 11 '20 at 14:39
• Wonderul, I like very much. Jul 11 '20 at 19:15

Please control arc with the help of --

arc=0mm,outer arc=1mm,


\begin{tcolorbox}
[arc=0mm,outer arc=1mm,
boxrule=0mm,toprule=0mm,bottomrule=0mm,left=1mm,right=1mm,leftrule=5pt,
titlerule=0mm,toptitle=0mm,bottomtitle=0mm,top=0mm,
colframe=blue!50!black,colback=blue!5!white,coltitle=blue!50!black,
]
This is a tcolorbox!
\end{tcolorbox}

• Uh, there's still an outline at the bottom... Jul 11 '20 at 14:39
• do go with the answer of @DavidPurton--its better suited Jul 11 '20 at 15:10