• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Gradients in SVG

As well as allowing a greater choice of solid colors, SVG provides elements to allow us to create color gradients. A gradient is a change in color value along a line. For example, a rectangle could be blue at one side and gradually change to pale gray on the other side. In SVG terminology, that is a linear gradient.

In SVG, gradients may be applied to either the stroke or fill of an SVG shape, or both if you prefer. SVG provides two elements, the linearGradient element and the radialGradient element, that, respectively describe linear and radial gradients.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint