EAGLE Help

palette()


Function
Returns color palette information.

Syntax
int palette(int index[, int type]);

Returns
The palette function returns an integer RGB value in the form 0x00rrggbb, or the type of the currently used palette (depending on the value of index).

Description
The palette function returns the RGB value of the color with the given index (which may be in the range 0..PALETTE_ENTRIES-1). If type is not given (or is -1) the palette assigned to the current editor window will be used. Otherwise type specifies which color palette to use (PALETTE_BLACK, PALETTE_WHITE or PALETTE_COLORED).

The special value -1 for index makes the function return the type of the palette that is currently in use by the editor window.

If either index or type is out of range, an error message will be given and the ULP will be terminated.

Constants

PALETTE_TYPES the number of palette types (3)
PALETTE_BLACK the black background palette (0)
PALETTE_WHITE the white background palette (1)
PALETTE_COLORED the colored background palette (2)
PALETTE_ENTRIES the number of colors per palette (64)


Index Copyright © 2005 CadSoft Computer GmbH