Color masking/changing of textures


I have several images that have black background, and then white images. I want to be able to change the color of the white part based upon different variables in my program. The only way I have figured out how to do this is to use glColorMask() and the problem with this is that the color that replaces the white is not constant because it is dependent upon what is drawn under it.

is there any simple way to change the white in the texture to a color of choice?


Simply use glColorMask but first draw the color you want behind it.
I would probably use textured quad whth alpha test enabled and non-textured quad behind.