In my rhythm game, I have a note object which can be of different colors depending on the note chart. I could use a sprite sheet with all the different color variations I use, but I would prefer to parametrize this. (For information, a note sprite is compound with one main color, for example a red note has only red, light red and dark red.)
So, how to change the colors of a sprite basing on a new color ?
I'm working with opengl, but any algorithm or math explanation will do. :)