Syntax
- color(s)
- color(r,g,b)
- color(r,g,b,o)
Parameters
- s—stringColor to set, in the format "#rrggbb" or "#rrggbboo" (hex).
- r—float (range[0.0, 1.0] ) Color to set in red components.
- g—float (range[0.0, 1.0] )Color to set in green components.
- b—float (range[0.0, 1.0] )Color to set in blue components.
- o—float (range[0.0, 1.0] )Color to set in opacity components.
Description
The color operation sets the color of the current shape's material. This command has the same effect as set(material.color.{ r | g | b }, val), it is a shortcut for convenience.
Related
Examples
Three ways to set a shape's color. The results are identical.
|