Changeable colour of imported SVG icons in QGIS
Thank You for nice collection of mapping icons!
It would be nice to make the icons mere configurable – adding possibility to change fill and outline colour.
It can be achieved by replacing (RegEx syntax)
fill="[^"]+"\/>
with
fill="param(fill) #FFF" stroke="param(outline) #000" stroke-width="param(outline-width) 1"\/>
Original icon. The icon's colour cannot be changed.
_All icons are the same colour.
It is possible to change fill colour as well as outline width and colour for the modified icons.
Icons can be drawn in different colours.
«sed» can be used to reach this goal. Bash script example is attached to this message. “OLDIFS” and “IFS” parameters are used as You have used spaces in file names (“currency-won_outline, Size=24px.svg”, “currency-won_solid, Size=16px.svg”,“currency-won_solid, Size=24px.svg”). As the result, keeping separate outline icon versions are made obsolete.
Hi!
I have created a 'perl' script to adopt SVG format images for using as 'QGIS' icons:
https://github.com/zirneklitis/svg2qgis_icon
Hey @zirneklitis appreciate your work on the icons and that you like them. the thing with the icons and the flexibility is that we create an outline and a fill version. we then merge and clean them up and export a shape only making sure that the icons look fine even when they are scaled up or down. ... Best M
«sed» can be used to reach this goal. Bash script example is attached to this message. “OLDIFS” and “IFS” parameters are used as You have used spaces in file names (“currency-won_outline, Size=24px.svg”, “currency-won_solid, Size=16px.svg”,“currency-won_solid, Size=24px.svg”). As the result, keeping separate outline icon versions are made obsolete.
I fixed the naming a while ago, just fyi.