How to assign a color value to face (object) using python
Set Material.use_object_color to True

From code in this answer which demonstrates use of object colour

# get mat create.
mat = bpy.data.materials.get("randobjcol")
if not mat:
    mat = bpy.data.materials.new("randobjcol")
    mat.use_object_color = True

# assign to object
ob.active_material = mat