Example Color Definitions | |||
---|---|---|---|
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 |
Colordef can be used to define a new color or to change the definition of an existing color. See also: color, ribinsidecolor, modelcolor, scolor, transparency, background, the Color Editor, coloring
The color_name can be:
The existing_color_name can be any color name that specifies a single color. The name colorpanel, fromeditor, or editor can be used to save the current Color Editor color to a name before further changes are made.
colordef lilac 0.5 0.5 1.0If only an existing_text_color_name is supplied (any of the 169 built-in color names or a name defined previously with colordef), the color's red, green, blue, and alpha component values will be reported in the status line and Reply Log.
colordef transparent_red 1 0 0 .4
colordef same_transparent_red 1,0,0,.4
colordef puce #551129
colordef raisin puce
colordef myblue colorpanel
colordef C green
The list keyword indicates listing all of the user-defined color names in the Reply Log.
A convenient way to define colors automatically is to place colordef commands in a startup command file (see the Command Line preferences). Color definitions are also saved in sessions.