Inverse Transparency of a PNG
Thinking laterally: What about using SVG and changing the colour dynamically?
Or using an font that contains all the glyphs you want and changing the colour with CSS?
It really depends on the precise result you're after, but there's hopefully a realtime method for doing it, so you don't need to generate an image for each colour variation.
Quite a few good SVG tricks are noted here, including colour change via CSS: http://css-tricks.com/using-svg/