GETPALETTE

Purpose:

Returns a series that contains the color palette entries.

Syntax:

GETPALETTE(win)

win

-

Optional. Window reference. Defaults to the current Window.

Returns:

A series of color indices.

Example:

If the palette in Window 2 is set to (blue, red, green),

 

getpalette(W2)

 

returns the series {1, 4, 2}, where 1, 4, and 2 are the color indices of blue, red, green. To set the palette of W3 to the same as that of W2, use the following command in W3:

 

mappalette(getpalette(W2))

Remarks:

Because GETPALETTE returns a series, you should call this function from a Window other than the one specified as the function argument.

See Also:

DEFCOLOR

MAPPALETTE

SETPALETTE