SVG Icon Color Changer

Icon Sub-Sets

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

0
Score 50.0%
Description:

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

15 years ago

You might want to have a look at these tools:

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

C

t3knomanser

15 years ago

A big part of this app is figuring out what to change the colors to, which could be accomplished by putting that library together properly, but at this point, that would mean learning python (on my todo, but low priority) and recoding the whole thing.

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

15 years ago

Ah, OK I see. That's an interesting idea.

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

12345678910
product-maker Base: 4 x 5.0 Ratings
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
updated Jul 19 2004
added Jul 19 2004
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0
System Tags iconset linux unix