TVLCT Procedure
Loads the display color translation tables from the specified variables.
Usage
TVLCT, v1, v2, v3[, start]
Input Parameters
v1, v2, v3—Contain the three values to be used for the specified color system (HLS, HSV, or RGB, as detailed in the Discussion section below). May be either scalar or vector expressions.
start—(optional) An integer value specifying the starting point in the color translation table into which the color intensities are loaded.
If start is not specified, a value of zero is used, causing the tables to be loaded starting at the first element of the translation tables.
Keywords
CMY—Indicates that the parameters specify color using the CMY (cyan, magenta, yellow) color system.
Get—If set to 1, returns the actual RGB values loaded into the device when either the HLS or HSV keywords are present. (The Get keyword has no effect when loading RGB tables.)
For example, the statements:
TVLCT, H, S, V, /HSV
TVLCT, R, G, B, /Get
load a color table based on the HSV system, and store the equivalent RGB values into the H, S, and V vectors.
HLS—Indicates that the parameters specify color using the HLS color system.
HSV—Indicates that the parameters specify color using the HSV color system.
Discussion
Color tables may be based on the following color systems: RGB (red, green, blue; the default), CMY (cyan, magenta, yellow), HLS (hue, lightness, saturation), and HSV (hue, saturation, value).
The meaning and type for the v1, v2, and v3 parameters are dependent upon the color system selected, as described below. If no color-system keywords are present, the RGB color system is used.
CMY—Parameters contain the cyan, magenta, and yellow values. All parameters are interpreted as integers in the range of 0 to 255 (255 being full intensity). May be scalars or may contain up to 256 elements.
HLS—Parameters contain the hue, lightness, and saturation values. All parameters are floating-point. Hue is expressed in degrees and is reduced modulo 360.
v2 and
v3 may range from 0 to 1.0.
HSV—Parameters contain the hue, saturation, and value (similar to intensity) values. All parameters are floating-point. Hue is expressed in degrees. The saturation and value may range from 0 to 1.0.
RGB—Parameters contain the red, green, and blue values. Values are interpreted as integers in the range of 0 to 255 (255 being full intensity). May be scalars or may contain up to 256 elements.
See Also
For more information, including a comparison of TVLCT and LOADCT, see the PV‑WAVE User’s Guide.
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.