I have a graphic in Adobe Illustrator (lets say a cat) that I want to use in an Android application. I would like to have the user be able to change the color of the fur using a color picker. What can I save the graphic as (SVG?) to allow me to programatically control the color from with the android app? Do I have to have a separate image for each color of the cat?
Share
There’s also a simple trick for color mixing without having to touch the pixel data. Just save several versions of the image with shifted colors, read them into the application, overlay them and use alpha blending to mix between them. This way you can get smooth colour changes without too much work. (I’ve done it, just not on Android.)
Reply to comment so that I have more space: Yes, three R/G/B images will work. If you want to have more color options, you can prepare six images with hue rotated by 60 degrees from each other (60/120/180/240/300/360). That can be easily done in your bitmap editor of choice, this is how the Hue/Saturation dialog looks like in Pixelmator:
Hue shift http://zoul.fleuron.cz/tmp/hue.jpg
Then you simply display two of them at a time, keep the lower alpha at one and change the upper alpha from 0 to 1. When you reach 1, you hide the lower image and display the next one in the foreground with zero alpha. Repeat ad libitum. This will give you plenty of color hues with smooth mixing and little work.