Vizard 7 » Command Index » Vizard objects » node3d » <node3d>.color


This action sets the diffuse color of the object

node = '' # Positional argument
op = viz.OP_DEFAULT # keyword argument
The red, green, and blue component for the new color.
node = ''
Name of sub-node to apply changes to
op = viz.OP_DEFAULT
Can be viz.OP_DEFAULT to use the nodes default op mode or a combination of the following values:

Op modes


When performing an operation on a node, traverse the entire subgraph and process all subnodes as well. This is the default value.


When applying attributes, have them override attributes of subnodes.


When performing an operation on the node, start at the root transform of the node, instead of the model. Processing the root will include all child Vizard nodes.


If subchild is '' then the color will be changed on the entire object.

Return Value



ball = viz.add('white_ball.wrl')
ball.color(1,0,0) #Turn the ball red

See also