Blender Game Engine control material values I'd like to have dynamically changing materials in the Blender Game engine.

Is there any way for the game logic or a python script to change the properties of a node in a material?

For example, in the image, I would like to be able to change the red "value" input that connects to the color ramp.

(I know that the BGE can assign an overall color to an object, but I would like to do more complex things than just single colors. If I could input that object color to the node set-up, having those 3 floats might be enough to work with)

Thanks for any help you can offer.
I've found a hack: the "Lamp data" node gives you the distance from a specified lamp to each fragment. That gives you a float to control the material, and the position of the lamp can be controlled with the game logic. 
This is a fairly terrible solution.