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

Color in SVG

Hitherto, we have used only one of the three possible syntaxes to refer to the color of the stroke or fill of SVG elements. Let's take a closer look at the syntax options for defining color.

SVG provides two separate numeric syntaxes for defining the color of the stroke (outline) or fill of SVG graphic shapes. In addition, for certain commonly used colors, a third option exists—using a named color. I suggest you avoid named colors except for simple colors such as black, red, and white because the numeric syntax provides far more color options.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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