Changing material color in real time

Hello. Sorry for my noob question. how can i change the material color in game. now i’m trying to o that in this way:

bpy.data.objects["Cube"].active_material.diffuse_color=(255,0,0)

but it makes a changes only after stop game simulation. Could you please help me to change the material in the game on the fly.

/uploads/default/original/4X/7/a/6/7a6be7869646a2cdd84599e7f3f3096d0c9bbdee.pngd=1326444037

You can change the object color as suggested by m10.
You can change the color of a vertex (slow).
You can replace a mesh (e.g. with a mesh with other material).
You can replace texture with VideoTexture.

Haha nice picture Monster, who made it? :smiley:

Thanks a lot