Change color in svg file through command line (inkscape)
command-line, inkscape, svg
Solution
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.
Problem
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.