9

If using ball shading on non-circle elements, it will well apply the shading effect, but it will use the default blue color. How to use ball shading with the element color.

\node[text width=3cm,fill=red,shading=ball] (test) at (1,1) {Text};

This will produce a rectangle with ball shading effect; however, in blue color instead of red.

1 Answer 1

8

Just add the ball color option:

\node[text width=3cm, shading=ball, ball color=red] (test) at (1,1) {Text};

More details in the PGF/TikZ manual (v 2.10) - page 413, under /tikz/ball color, where you can find links to other sections with other useful options too.

1
  • 1
    Thanks, I check TikZ manual everyday for my issues; but it is not easy to find something in 800 pages ;)
    – Googlebot
    Jun 3, 2012 at 12:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .