# Restricting the background color to an ovalbox

The snippet

\documentclass[png,convert={density=600}]{standalone}
\usepackage{times,fancybox,varwidth,color}
\pagecolor{cyan}
\cornersize{1}

\begin{document}
\ovalbox{\large Hello}
\end{document}


generates the png image

with the help of pdflatex -shell-escape question.

How do I make the background fill just the ovalbox (while the ovalbox appears with no boundary)?

-
If you are ok with using tikz package then you can use \begin{tikzpicture} \node [draw=none, fill=cyan, rounded corners=5pt] {\large Hello}; \end{tikzpicture}. – Peter Grill Jan 28 '14 at 18:47
I was hoping to delay reading the tikz documentation even longer, but whatever works is fine. If you are ok with my marking your answer as the correct one, but then marking another if it turns out a solution without tikz is possible, please add an answer. – Calaf Jan 28 '14 at 19:31
You also can use pstricks (and auto-pst-pdf if you do not want to go the way latex -> dvi -> dvipdf) with this line:\psframebox*[fillcolor=cyan, framearc=0.5]{\large Hello} – Bernard Jan 28 '14 at 20:38
This is not as easy with fancybox since the box is constructed using 4 straight rules (top/bottom + left/right) and four corners (upper left/right, lower left/right). There is no single structure to bound colour within. Graphics packages like tikz and pstricks can manage this without problem though. – Werner Jan 28 '14 at 20:38
@Calaf: Yep, I can understand why one would want to postpone learning tikz, but if you are doing any serious drawings (or already know pstricks), resistance is futile :-). – Peter Grill Jan 28 '14 at 21:35

With tcolorbox?

Code:

\documentclass[png,convert={density=600}]{standalone}
\usepackage{times,tcolorbox}
\newtcbox{\myovalbox}{colback=cyan,boxrule=0pt,arc=5pt,
boxsep=0pt,left=3pt,right=3pt,top=3pt,bottom=3pt}

\begin{document}
\myovalbox{\large Hello}
\end{document}

-

Here is a tikz solution:

## Code:

\documentclass[png,convert={density=600}]{standalone}
\usepackage{times}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\node [fill=cyan, rounded corners=5pt] {\large Hello};
\end{tikzpicture}
\end{document}

-
My sequel question (tex.stackexchange.com/q/156406/9549) applies equally to tcolorbox and to tikz :). – Calaf Jan 28 '14 at 21:38