Syntax
void GtSetPalette( int index, int rgb );
Arguments
index selects one of the 16 text palette entries, numbered 0 through 15.
rgb is the color encoded as 0x00BBGGRR.
Return value
No return value.
Description
Changes the color associated with the selected terminal text palette index. For example, 0x0000FF represents red in this format.
Example
#include "xdev-wtui.h"
#include <stdio.h>
int main( void )
{
int previous = GtGetPalette( 7 );
GtSetPalette( 7, 0x0000FF );
printf( "Palette entry 7: %06X\n", ( unsigned int )GtGetPalette( 7 ) );
GtSetPalette( 7, previous );
return 0;
}