Regular API function

simSetShapeColor / sim.setShapeColor

Description Sets the color of a shape. See also other rendering related functions.
C/C++
synopsis
simInt simSetShapeColor(simInt shapeHandle,simChar* colorName,simInt colorComponent,simFloat* rgbData)
C/C++
parameters
shapeHandle: handle of the shape
colorName: name of a color. Can be nullptr, but if a name is provided, only shapes (or sub-entities of them) with a same color name will be modified. If colorName is @compound, then all individual colors of a compound shape can be set at once.
colorComponent: a color component
rgbData: red, green and blue components of the color (3 values), or the transparency value (1 value)
C/C++
return value
-1 if operation was not successful
Lua
synopsis
sim.setShapeColor(int shapeHandle,string colorName,int colorComponent,float[3] rgbData)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Python
synopsis
sim.setShapeColor(int shapeHandle,string colorName,int colorComponent,list rgbData)

<