Tutorial by Examples

A list of recognised color keyword names can be found in the W3C Recommendation for SVG. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle r="30" cx="100" cy="100" fill="red" stroke=&qu...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle r="30" cx="100" cy="100" fill="#ff0000" stroke="#00ff00" /> <rect x="200" y="200" width="50&...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle r="30" cx="100" cy="100" fill="rgb(255, 0, 0)" stroke="rgb(0, 255, 0)" /> <rect x="200" y="200" w...
currentColor is most usefull in inline SVGs. With this you can inherit the parents css color and use it everywhere colors are used in SVG. In this example the first circle uses the text color as fill color, and the second circle uses it as the stroke color. <html> <head> ...

Page 1 of 1