How to map different colors to parts of an image/sprite?
I am rather new to all this so please bare with me as I may use incorrect terminology or just be ignorant.
I have created some image assets (png) to use in a creating shield heraldry for my game. Essentially each part of the shield is an image stacked on the lower layers to form the complete heraldry (field, division, ordinary, charge, etc).
For some divisions, there are two colors that can be assigned. My original idea was to map the definition of those color assignments to ones used in the image. Example being where the left side is #CCCCCC and the right is #BBBBBB. The player would choose what colors they would want for the left and right and in code (where my question lies) 'assign' or replace the colors with ones chosen by the user.
I began realizing that this wasn't as straight forward as I had hoped since Unity has no idea about the layers in the image and I can only assign a single color across the whole image.
This is what I have in Affinity Designer, showing the two layers in the group to form the image.
This is where I am at now. Perhaps the player wanted the right side to be blue.
What I really need help with is a solution to this problem and to know if it can really be done the way I intend for it to. I know there are many games that do this sort of thing where there are many parts of to a 'person' or 'thing' and you get to customize, say the hair, clothing, etc, which may not be the same thing but that is what I am going for.
Any ideas or suggestions to get me on the right path?
Thanks a bunch!
Your answer
Follow this Question
Related Questions
Image Colour change not working with anythign other than base preset colours 2 Answers
general problem on Lerp fonction for smoothcolor changing 1 Answer
renderer material color changing with script ?? 1 Answer
How to get a fluid color transition for every tile in a tilemap? 0 Answers
Microsoft HoloLens Spatial Mapping - Wireframe Mesh not visible in Emulator 1 Answer