I'm trying to change a picture drawn using the plain picture environment and I need to change the background color of certain \framebox to lightgrey. Is it possible?
I know that there are more powerful environment like tikz, but the figure is quite complex, and I prefer to change the less I can.
For example, supposing to have this LaTeX code:
\documentclass[12pt]{article}
\usepackage{picture}
\begin{document}
\begin{figure}[hp]
\begin{center}
\setlength{\unitlength}{1cm}
\begin{picture}(7,3)(0,0)
\put( 4,3){\framebox(3,3){World}} % background = grey ??
\put( 0,3){\framebox(3,3){Hello}}
\end{picture}
\end{center}
\end{figure}
\end{document}
producing this figure:

How can I change that code in order to get this result:

with the minimal effort in term of code changes ?
I tried to use pstricks that is something like a superset of picture package, but I wasn't able to solve my issue...



xcoloralso has the command\fcolorbox{<frame color>}{<background color>}{<text>}, which does this directly. According to the documentation, it takes care drawing the frame so that it is not overwritten by the background, so perhaps it is better than combining\colorboxand\framebox. Though I see now that the OP is using a particular version of\frameboxin thepicturepackage, so maybe this option isn't available here. – Ryan Reich Dec 12 '11 at 23:31\fcolorboxto match\framebox- see my answer. – Werner Dec 12 '11 at 23:36