Is it possible to selectively change both the foreground and background colour of a sprite?
Say I have a sprite with a transparent bg like this:
I can change its color using the SpriteRenderer Color property.
However, I would like to adjust its background color, possibly defined by the alpha channel. Additionally, I'm wondering if it is possible to adjust the foreground color, in addition to the background colour. The end result would be something like this:
I have looked around, and seen answers for people who wish to change the sprite bg colour in the inspector but not within the game itself.
My only idea is to draw a quad underneath the sprite itself to change the bg colour, and then to adjust the sprite colour using the SpriteRenderer component. But this seems rather inefficient because then it will require 2x the GameObjects for each sprite.
Any suggestions are helpful, thanks!