How do I change a color to another in a bitmapData image?
Let's say you have an image of a cartoon human that is wearing a blue jacket with white sleeves, blue shoes, and grey pants. Brown hair and biege skin tone.
(My project actually has 1300 of these images - 325 are blue cloths, 325 are red cloths, 325 are green cloths, and 325 are purple cloths)
I am having a major problem with file size and memory usage due to all the images, so I have been asked to see if there was a way I could programmatically change the clothing color... this way we can use any color we want, and only have 325 base images.
I have been trying to play with color matrix filter and color transform, but I can't seem to get the hang of it
Is there a way I can extract only the "blue" colors from the image and do a hue shift on it to the color that I want it to be without effecting the non-blue colors?
My idea was something along the lines of:
Copy the "blue" color channel, hue shift it, then merge it back into frame....