• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Color, Gradients, and Patterns > Colors in SVG: Filling and Stroking

Colors in SVG: Filling and Stroking

The fill property paints the inside of a shape, path, or text with color, and the stroke property outlines the shape, path, or text. Understanding how SVG paints an object is important, because you can then control how an object will render. SVG has a painting order that it uses to create and paint objects. Objects are painted in the order in which they appear in the code. If two objects intersect, the object that was painted last will appear on top of the one that was painted first.

For instance, in the code snippet:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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