User Guide > Using Color in Graphics Windows > Summary of Color Table Procedures
  

Summary of Color Table Procedures
The Standard Library procedures listed in this section are used to manipulate color tables. Some of the procedures are basic procedures that you use programmatically to change color tables, and others are window-based procedures that facilitate interactive modifications. For detailed information on any of these routines, see the PV‑WAVE Reference.
Basic Color Table Procedures
These commands can always be entered at the WAVE> prompt:
*COLOR_CONVERT—This procedure converts vector or scalar color table values from one color system to another. The supported color systems are HSV, HLS, and RGB.
*HIST_EQUAL_CT—This procedure uses an input image parameter, or the region of the display you mark, to obtain a pixel distribution histogram. The cumulative integral is taken and scaled, and the result is applied to the current color table.
*HLS—This procedure makes and loads color tables based on the HLS color system. This system is based on the Ostwald color system. As with the HSV procedure, spirals are interpolated in a three-dimensional color space.
*HSV—This procedure makes and loads color tables based on the HSV color system. A spiral through the single-ended HSV cone is traced. The color representation of pixel values is linearly interpolated from beginning and ending values of hue, saturation, and value.
*LOADCT—This procedure loads predefined color tables. To obtain a menu listing of the available color tables, call LOADCT with no parameters.
*MODIFYCT—This procedure is used to update the file
(colors.tbl) that lists the system color tables. This procedure should only be used by persons authorized to change the predefined color tables supplied with PV‑WAVE.
*PSEUDO—This procedure generates and loads a pseudo color table based on the HLS color system. The colors it generates are theoretically “a near maximal entropy mapping” for the eye. The parameters are similar to those used with the HLS and HSV procedures.
*STRETCH—This procedure linearly expands the entire range of the last color table loaded by a PV‑WAVE procedure to cover a given range of pixel values.
*TEK_COLOR—This procedure loads a color table that mimics the 32 distinct plot colors of the Tektronix 4115 display device. These colors ensure that the various datasets in a line plot or bar chart are easy to differentiate.
*TVLCT—This procedure loads color tables stored in variables. Once the variables are loaded into the color table, it is used like any other color table.
Interactive Color Table Procedures
The procedures listed in this section create windows of varying complexity that can be used to interactively make modifications to color tables.
Interactive (PV‑WAVE Widgets) Color Table Procedures
The procedures listed in this section are PV‑WAVE Widgets applications, and thus are available using the Motif look-and-feel. For more information on PV‑WAVE Widgets, refer to the
*WgCbarTool—This procedure creates a simple color bar that can be used to view and interactively shift a color table.
*WgCeditTool—This procedure creates a full-featured set of menus and widgets enclosed in a window; this window allows you to edit the values in color tables in many different ways.
*WgCtTool—This procedure creates a simple widget that can be used interactively to modify a color table.
 
note
The window-oriented procedures listed in this section will not work unless you are using an X-compatible window manager, such as Motif. All procedures are written in the PV‑WAVE language and they all use the TVLCT procedure to load the color tables.
Interactive (Generic) Color Table Procedures
The procedure listed below creates windows that have a “generic” look-and-feel:
*COLOR_PALETTE—This procedure displays the current color table in a separate window with color indices overwritten on the display. This is a handy procedure for finding out what color in the current color table is associated with a particular color index.
 
note
All procedures are written in the PV‑WAVE language and they all use the TVLCT procedure to load the color tables.
Some of these routines are written to be used with a three-button mouse. If you are using a two-button mouse, you can use the <Alt> key in combination with the left mouse button to simulate a middle mouse button.
 

Version 2017.1
Copyright © 2019, Rogue Wave Software, Inc. All Rights Reserved.