*May or may not contain any actual "CSS" Click your left mouse button to acknowledge and your selected SVG shape will be filled with that color. CSS: Change the color attribute in CSS to change the color of the SVG (works with transition!) Saw a sneak peak of this yesterday as I was putting together a new pen. Before jumping into fill-rule it’s important to understand the function of the fillproperty in general. Since fill: only affects svg, it fails w3.org css validation , should I be concerned about that??? Here is an example: There are a range of styling attributes available. These are controlled by the fill-opacity and stroke-opacity attributes. The first example specifies three numbers, in which case the renderer loops the numbers twice to create an even pattern. The stroke-width property defines the width of this stroke. You can use the same css color naming schemes that you use in HTML, whether that's color names (that is red), rgb values (that is rgb (255,0,0)), hex values, rgba values, etc. This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. Contact Us. But the icon itself (which is really a drawn ) will be red. I’ve seen a trick like that before, where the file path was like svg.svg?color=#f00 and some JS inside the .svg ran and colorized itself. There are additional stroke and fill properties available, including fill-rule, which specifies how to color in shapes that overlap themselves; stroke-miterlimit, which determines if a stroke should draw miters; and stroke-dashoffset, which specifies where to start a dasharray on a line. Using fill sets the color inside the object and stroke sets the color of the line drawn around the object. Take this example, which is just our original example inside the : What is the currentColor at the