MODIFYCT Procedure
Standard Library procedure that lets you replace one of the PV-WAVE color tables (defined in the colors.tbl file) with a new color table.
Usage
MODIFYCT, table, name, red, green, blue
Input Parameters
table—The color table number to change. The numbers range from 0 to 15.
name—The name of the modified color table. The string may be a maximum of 32 characters.
red—The red color gun vector. It contains 256 elements.
green—The green color gun vector. It contains 256 elements.
blue—The blue color gun vector. It contains 256 elements.
Keywords
Ctfile—Specifies a string containing the name of a color table file to load.
Discussion
Since any changes to the system color tables will affect all users, this procedure should be reserved for a single individual at a PV-WAVE site with authorization to make system modifications. It is also a good idea to make a copy of the colors.tbl file prior to using MODIFYCT.
Example
This example demonstrates how to use MODIFYCT to modify a color table file such as $WAVE_DIR/wave/bin/colors.tbl. This colors.tbl file must be saved to the current directory as custom1.sav in order to run the following code.
 
note
LOADCT_CUSTOM uses a file in your home directory called .wg_colors. LOADCT_CUSTOM is not necessary for MODIFYCT to work.
; Show the color palette
COLOR_PALETTE
; load & get custom ct from file .wg_colors
LOADCT_CUSTOM, 0 & TVLCT, r, g, b, /Get
 
; Modify current default ct with custom ct values
MODIFYCT, 0, 'zeroeth', r, g, b
 
; Verify that the custom ct is now part of default ct
LOADCT, 0 & TVLCT, r, g, b, /Get
 
; Save default ct into file called custom1.sav
MODIFYCT, 0, 'Zzeroeth', r, g, b, Ctfile = 'custom1.sav'
 
LOADCT_CUSTOM, 1 & TVLCT, r, g, b, /Get
MODIFYCT, 1, 'first', r, g, b
LOADCT, 1 & TVLCT, r, g, b, /Get
MODIFYCT, 1, 'Ffirst', r, g, b, Ctfile = 'custom1.sav'
 
LOADCT_CUSTOM, 2  & TVLCT, r, g, b, /Get
MODIFYCT, 2, 'second', r, g, b
LOADCT, 2 & TVLCT, r, g, b, /Get
MODIFYCT, 2, 'Ssecond', r, g, b, Ctfile = 'custom1.sav'
See Also
For more information on customizing color tables, see the PV‑WAVE User’s Guide.