How to change color of composite svg oject

I have a composite svg object with shading and highlighting. Is there a way to change the color of objects without also specifying shade and highlight changes?

I tried using the grayscale underlying svg and svg on top where I can change the fill and opacity, but the resulting colors look flat.

Is there a library that does this?

0
source share
1 answer

I created an algorithm for scrolling through gray svg paths, where the paths are ordered by shadow (ta, Inkscape) and change the hue to create my color image.

See hue tinting and rgbToHex here for useful information.

It worked out well. But now I find that to get a “good” image, I have 150 KB SVG files (60 shading paths, about 10 kbit / s on one path with two 36 KB paths). Not very good, especially since the original png was only 21kb. But after googling, it seems mobile app sizes up to 2 GB are fine. This means that mine, probably having knocked over a scale of about 10 mb in size even with large png files, should be fine.

0
source

All Articles