SVG 命名的颜色-对填充和描边属性使用预定义的名称

示例

可以在SVG的W3C建议书中找到公认的颜色关键字名称的列表。

<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="green" />
  <rect x="200" y="200" width="50" height="50" fill="yellow" stroke="blue" />
</svg>