PSEUDO Procedure

Standard Library procedure that creates a pseudo color table based on the hue, lightness, saturation (HLS) color system.

Usage

PSEUDO, ltlo, lthi, stlo, sthi, hue, lp[, rgb]

Input Parameters

ltlo — The starting color lightness or intensity, expressed as 0 to 100 percent. Full lightness (the brightest color) is 100 percent.

lthi — The ending color lightness or intensity, expressed as 0 to 100 percent.

stlo — The starting color saturation, expressed as 0 to 100 percent. Full saturation (undiluted or pure color) is expressed as 100 percent.

sthi — The ending color saturation, expressed as 0 to 100 percent.

hue — The starting hue. It ranges from 0 to 360 degrees, with red equal to 0, green equal to 120, and blue equal to 240.

lp — The number of loops of hue to make in the color cone. Does not have to be an integer.

Output Parameters

rgb — (optional) A 256-by-3 integer output array containing the red, green, and blue vector values loaded into the color tables. The red vector is equal to RGB(*, 0), the green vector is RGB(*, 1), and the blue vector is RGB(*, 2).

Keywords

None.

Discussion

The pseudo-color mapping generated by PSEUDO is done by the following three steps:

1. Map the HLS coordinate space to the lightness, absorbance, saturation (LAS) coordinate space.

2. Find n colors (in this case 256) spread out along a helix that spans this LAS space. These colors are supposedly a near maximal entropy mapping for the eye, given a particular n.

3. Map the LAS coordinate space into the red, green, blue (RGB) coordinate space.

The result, given n desired colors, is that n discrete values are loaded into the red color vector, n discrete values are loaded into the green color vector, and n discrete values are loaded into the blue color vector.

See Also

HLS,  LOADCT,  TVLCT

For background information about color systems, see the section Understanding Color Systems in Chapter 11 of the PV‑WAVE User Guide.