Creates or alters a color table definition.
Synopsis:
defct
colortablename option
=
value [, option
=
value, ...]
Arguments:
colortablename
The name of the colortable to create or alter.
option
An attribute than can be modified. See table below.
value
A value associated with the matching
option
. See table below.
Option
|
Value
|
Value Meaning
|
Default Value
|
colors
|
{position r g b, position r g b, [position r g b...]}
|
This is a list of floating point numbers in the range of 0.0 to 1.0 that represent color control points. Each control point consists of four floating point numbers: position, r,g,b. The position specifies where the control point lies on a line segment [0.0, 1.0]. The r, g, b values specify the red, green, blue components of the control point. There must be at least two control points given when providing this option to the defct command.
|
|
copy
|
color table name
|
This is a string value that gives the name of a MeshTV standard color table or a color table that has been previously defined with the defct command. The color table specified with this arguments is copied over the colortable that is being modified.
|
|
equal
|
on, off
|
This flag alters the color table so the position of the control points is only used to determine their order. The color table is then generated with the assumption that the control points are all equally spaced.
|
off
|
reset
|
on, off
|
This option exists to provide a way to reset the attributes of a MeshTV standard color table. This flag has no effect on a user-defined color table.
|
off
|
reverse
|
on, off
|
This flag reverses the order of control points so the colortable is generated in reverse. This is easier than changing the control points.
|
off
|
smooth
|
on, off
|
This flag turns on linear interpolation of colors between control points, which leads to a smooth looking color table.
|
on
|
Description:
The
defct
command defines a new color table or alters an existing color table. To define a new color table, all that must be provided is a unique color table name and a list of colors. If an existing color table name is given, the new attributes are assigned to the pre-existing color table. The standard MeshTV color tables can be modified with the
defct
command as though they were user-defined color tables. The main difference is that the
reset
option can be used with the MeshTV standard color tables to reset them to their default attributes.
Once a color table is defined or modified with the
defct
command, the
ct
command must be used in order to set the color table in the window. This applies even if the altered color table is already set in the window. Setting the color table again with the
ct
command causes the new color table definition to be used when generating colors.
All MeshTV windows share the same color table definitions so any changes made to a color table will eventually show up in all windows using a color table that has been modified.
Examples:
#Change the MeshTV hot color table to be equal & not smooth.
defct hot equal=on, smooth=off
#Create a new color table called magma.
defct magma colors={0 0 0 0 .25 1 0 0 .66 1 1 0 1 1 1 1}
#Change the new magma color table so it is reversed.
defct magma reverse=on
#Make the MeshTV hot color table use its default values.
defct hot reset=on
See Also:
ct
,
pc
,
redraw
,
winset