setting colors in the game engine

Hello,

I’m trying to build a system that reads from a flat text file for its list of objects. There are two lines per object in the file. Line 1 is the coordinates, and line 2 is the type of object (in my case: desktops, wifi devices, servers, routers, etc.)

I want the different types of devices to be color coded. So desktops are blue, servers are red, etc etc. Is it possible to set an object’s color using python?

For anyone interested in the follow up, object color can be driven by the ColR, ColG, ColB, and ColA controls in the object’s IPO window. Not the material IPO, the object IPO itself.