DADiSP Worksheet Functions > Function Categories > 3D and 4D Graphics > SETXPAL

 

SETXPAL

Purpose:

Sets the color index to correspond to the indicated palette color.

Syntax:

SETXPAL(cindex, cpal)

cindex

-

An integer, the color index.

cpal

-

An integer, the palette color.

Returns:

A series or table.

Remarks:

The color index is the internal color number that other functions use to refer to a color. For example, wincolor(BLUE) is equivalent to wincolor(1) because BLUE is a macro that expands to the number 1; and 1 is the color index that initially is set to get a color from the device that the developers regard as a pleasing shade of blue. On a PC, default color indices are in the range 0-15; on workstations, the default color indices are in the range 0-31.

 

The palette color is the color number that the graphics library uses to get the color from the display device. The palette color is a long integer constructed from three shorter integers that range from 0 to 63, each controlling the levels of red, blue, and green: the long integer is red + 256*green + 65536*blue.

See Also:

DEFCOLOR

WEBCOLORS