I have an .svg file with only one color. I want to change this color to another and export it through command line. (I have to do it about 100 times, so doing it by hand doesn't work.) I use Inkscape at the moment. I am able to change the background color and export with this command:
inkscape -f name.svt -e output_name.png -b #000080
But I cannot find the way to change the normal color. I find this verb:
org.inkscape.color.replacecolor
But I don't know, how to add the color I want to use, somewhere I read, that I cannot add variables to verbes, but in that case how can be this verb used?
Thank you in advance.
This is not a general purpose solution, but since a SVG file is just XML internally, if your SVG file is simple enough you might be able to get away with a simple sed
replacement. For example the following replaces #000000 (black) with #ffffff (white):
sed -e "s/#000000/#ffffff/" input.svg >output.svg
This may or may not be good enough for your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With