Regular API function

sim.changeEntityColor

Description Changes the color of an entity, and returns its original color. Currently only takes into account collections and shapes. See also sim.restoreEntityColor.
C synopsis
C parameters
C return value
Lua synopsis table[] originalColorData=sim.changeEntityColor(int entityHandle,table[3] newColor,int colorComponent=sim.colorcomponent_ambient_diffuse)
Lua parameters
entityHandle: the handle of a entity
newColor: a table to 3 rgb values, each between 0-1
colorComponent: a color component
Lua return values
originalColorData: the original color data, to be used as argument with sim.restoreEntityColor