December 2002
Beginner to intermediate
464 pages
8h 34m
English
Objects in SVG can be filled or stroked with gradients, as well as with solid colors. A gradient is a smooth transition, or fade, from one color to another, or through a series of colors into other colors. You can use two types of gradients in SVG, linear gradients and radial gradients.
Figure 5-2 shows a rectangle filled with a linear gradient.

This rectangle has a two-color gradient that spans from red on the left to yellow on the right. (The image shown is in grayscale for this book). Example 5-2 provides the code for this image in Figure 5-2.