Colordef can be used to define a new color named color_name or to change the definition of an existing color. While both color_name and existing_color_name can contain letters, digits, and underscores, only existing_color_name can contain spaces. The red, green, blue, and alpha arguments must be floating point numbers between zero and one, inclusive. The alpha value denotes transparency, where 0.0 means completely transparent (invisible) and 1.0 means completely opaque (the default).
color name | red | green | blue |
---|---|---|---|
red | 1.0 | 0.0 | 0.0 |
green | 0.0 | 1.0 | 0.0 |
blue | 0.0 | 0.0 | 1.0 |
cyan | 0.0 | 1.0 | 1.0 |
magenta | 1.0 | 0.0 | 1.0 |
yellow | 1.0 | 1.0 | 0.0 |
white | 1.0 | 1.0 | 1.0 |
black | 0.0 | 0.0 | 0.0 |
Examples:
colordef lilac 0.5 0.5 1.0- create a color named lilac
colordef activesite red- create a color named activesite which is actually red
The color currently defined in the Color Editor is named colorpanel. Colorpanel can be used in commands just like any normal color name, and colordef is especially useful for saving colors defined in the tool before closing it or changing the current color, for example:
colordef pink colorpanel
See also: color, rescolor, modelcolor, colorrename