I have an SVG image and I'm looking to change part of its color. The SVG will always consist of 2 colors, i.e. black & yellow
I'm looking to change the yellow color with a css class, so I could switch to another color theme easily without creating all the svg buttons in the yellow version.
Is this at all possible? I can't seem to find much online about this..
The SVG is set on span/div's using a class with background-image
If i implement the tag with SVG then I can change the color with css. But I'm looking to use it as a class if possible (and the svg should not be directly in the html)
<svg>
<use xlink:href="#robot" id="robot-1" />
</svg>
Turorial: https://tympanus.net/codrops/2015/07/16/styling-svg-use-content-css/
JsFiddle: https://jsfiddle.net/wahjvmnq/