How do I have an SVG image inherit colors from the HTML document?

HTML uses color whereas SVG uses fill and stroke. You can get fill or stroke to use the value of the color CSS property by using the value currentColor e.g. fill="currentColor"


You can use fill="currentColor".

<a href="#" style="color:red">
<svg fill="currentColor"> ...</svg>
</a>