SETPALETTECOLOR

Top  Previous  Next

Syntax

INT = SETPALETTECOLOR(index as INT,col as UINT)

Description

Sets the color of a palette index in an 8 bit screen.

Parameters

index - The palette index to change.

col - The RGB color to set.

Return value

0 on success or -1 if the palette could not be changed.

Remarks

index is a palette number from 0 to 255. This function only works with 8 bit screen modes and has no effect on true color screens.

See Also: LOADPALETTE, GETPALETTECOLOR

Example usage

SETPALETTECOLOR 2, RGB(255,255,0)
FILLSCREEN 2