
SVG Icon Color Changer
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
I saw a complaint in one of the forums that there were too many icon sets being made in blue.
Well, if that icon set is an SVG icon, your problems are solved- or will be, but right now, this program is a little touch and go, but I just banged it out tonight, and haven't really tested it.
At any rate, this program will take an SVG file and a new color (hex triplet without the "#" sign) and restructure the colors in that file around the one you provided. "recolor -h" will provide a usage description.
There are bugs. I know. Give it a shot- but backup your icon files that you're testing it on first.
TODO:
Figure out why, if you run it enough times on the same file, it always results in giving every shape the same color.
Test it against an SVG with a gradient, which I haven't done yet.
Add globs, and add a switch that allows you to work against a directory at once.
telex
16 years ago
http://freedesktop.org/cgi-bin/viewcvs.cgi/svg-icons/utils/svg-utils/
They were used, for example, on the Lila icon set to have a blue and purple version. They can also do a lot more, if you have a good look.
Report
t3knomanser
16 years ago
As a note on the algorithm used, the theory is that the individual colors chosen is not important- just the distance around the colorwheel- so it simply does a hue rotation.
Though, for the next major version upgrade, I probably will switch to that library. Right now, it decides what the main color is based on the number of occurances, which means if you have a dozen small green triangles and one big blue circle, it decides green is the main color. I want to change it so that it finds the shape with the largest area, and uses that as its main color.
Report
telex
16 years ago
You should contact the author of those SVG tools on fd.o, since he and I are working with freedesktop.org towards some cross-desktop SVG tools. He'd be interested in what you're doing, and you could develop your tools as part of the fd.o project:
http://www.programmer-art.org/?page=contact
Report