[Tex/LaTex] Drawing neat UML class diagrams with tikz

tikz-pgf

I want to draw (UML) class diagrams with tikz (and I'm aware there is a special tikz package for that). I want to imitate the style that yuml.me uses, since personally I find it very appealing and at the same time still serious. Here is an example what I would like to achieve:

Note in particular that there is a slight shadow/glow outside and inside the border and the subtle color gradient used for the fill color.

Here is a zoomed view to make clear what I mean:

I tried to take the color values from an yuml diagram and transfer them to tikz, but the closest I got is the following:

\tikzstyle{class}=[
    rectangle,
    draw=black,
    text centered,
    anchor=north,
    text=black,
    text width=3cm,
    shading=axis,
    bottom color={rgb:red,222;green,222;blue,222},top color=white,shading angle=45]

\begin{tikzpicture}[node distance=2cm]
    \node (Item) [class, rectangle split, rectangle split parts=2]
    {
        \textbf{Car}
        \nodepart{second}foobar\newline baz
    };      
\end{tikzpicture}

which is still pretty ugly and not anywhere near the style I want to achieve.

Any help from the tikz-experts would be appriciated!

Best Answer

What about this?

enter image description here

Just replace your older bottom color definition with bottom color=black!20. Change that number to increase or decrease the saturation.