I need nested boxes, as they are shown in this question, but colored ones.
I tried both solutions. Using shapes.multipart I totally failed when tried to generate the nodeparts by a foreach command. If I use multiple \tikz parts in one nodepart, I can use foreach, but I am unable to put them in one column (tried matrix and failed).
Trying drs with xcolor I almost got a correct result, but when I write this:
\documentclass{article}
\usepackage{drs}
\usepackage{xcolor}
\begin{document}
\colorbox{green}
{
\drs{box label}
{
drs box text
}
}
\end{document}
some margin around the drs generated box is colored as well.
What I basically need is to draw a colored box with some label. Then, by a foreach loop, to generate several colored boxes inside it. It is perfectly possible to have them in one column.
Following advice from egreg I wrote this:
\documentclass{article}
\newcommand{\zcolorbox}[2]{{\setlength{\fboxsep}{0pt}\colorbox{#1}{#2}}}
\newcommand{\nestedbox}[3]{\zcolorbox{#1}{\drs{#2}{#3}}}
\usepackage{drs}
\usepackage{xcolor}
\begin{document}
\nestedbox{green}{box label}{\nestedbox{yellow}{inner box label}{inner box text}}
\end{document}
and got this:

How can I get rid of the yellow color there, but not of the space?



\drscommand from, for example? – Alan Munn Feb 18 '12 at 22:31