Which bpy.data.objects option controls the color of the object's texture?
If you use in bpy.data.objects.active_material.material.diffuse_color you can set the diffuse color, and there are some other properties that may be useful here and here

In my experience, materials are tricky with scripts. You need to remember that materials are separate from the objects, so if the same material is assigned to every cube, changing it for one material will change it for all of them.