Firstly, the error you get is because the code you show is not valid python code, to change the color value, you need to have the index (the [0]) attached to the property name and the value to assign goes on the other side of the = sign.
color[0] = 0.1
It is possible to assign the same value to several properties in one line -
color[0] = color[1] = color[2] = 0.2
You can also assign all four values (color includes an alpha) to the color property by using a tuple -
red = blue = green = alpha = 0.2
color = (red, green, blue, alpha)
Now on to what you are trying to do -
There are two ways to access blenders data, bpy is only used for accessing data while you are modeling, texturing etc.
When the game engine is running bpy is not available, you need to use bge to access any data from scripts you assign to a python controller.
To get what you are trying to work, first enable object color for the material, you can find this under options in the material settings. With this enabled you can adjust the objects color property -
import bge
cont = bge.logic.getCurrentController()
own = cont.owner
own.color[0] = 0.2 # red
own.color[1] = 0.3 # green
own.color[2] = 0.4 # blue
It is possible to access other objects, you use getCurrentScene() to get the current scene which has the list of objects,
scn = bge.logic.getCurrentScene()
enemy = scn.objects['enemy']
You can find sample code in many of the API pages for game engine types and will find blender.stackexchange is a better place to ask blender questions.