I make use of the Material Design Icons using the method described here:
https://github.com/google/material-design-icons#using-svg-sprites
However, the icons always end up in black. How am I supposed to change their color, say, into white?
I am aware of the possibility that the SVG source code can be edited so achieve the effect, but this does not seem to be the canonical way to go. The material design icons repository has their CSS image sprites in different versions depending on the color, while the SVG is in just one color (in fact, in no color because no color is ever mentioned in the SVG code). If I needed different SVG sprite files for white or for black icons, they would have included different versions as they did in the case of CSS image sprites, wouldn't they?
It should just be a matter of setting
fill
property for your icon. For example, add a class called "red" to your icon<div>
:Then define the class red" in your CSS.
Note that you set the fill colour of SVG elements with the
fill
property, not 'color' etc as with HTML elements.