Change default svg color
by Emile `iMil' Heitor - 2020-03-21
Again at ${DAYWORK}
I was working on a network diagram, and found this incredibly useful website that regroups thousands of svg
icons for all the major brands. I use draw.io to create my diagrams, and whereas they have a tutorial on how to modify an svg
color (fill
property) within draw.io, it would not work as shown.
I figured out there was a very simple method to specify an svg
file default color: edit the file, and add fill="white"
(or any color code like #fafafa
). Something like:
<svg role="img" fill="white" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
And you’re done, draw.io will display the svg
file with the desired color.