
------------------------------------------------------------------------------
1.18 Set color palette of VGA characters. <Main>
------------------------------------------------------------------------------
[Name]
crt_setpalette
[Syntax]
#include <crt.h>
#include <graph.h>
int crt_setpalette( unsigned int index, unsigned long color ) ;
[Arguments]
index Index of color palette. (0..15,_PAL_COMP,_PAL_RVS)
color Color value.
[Return]
Returns zero if successful. If any error (incorrect color palette
index or not a VGA display device), returns non-zero value.
[Description]
Sets the color value to the color palette for character.
Specify the color palette index number (0..15) in "index" and the
color value in "color". The format of the color value specified in
"color" is same as the color value used in a graphic function
"_remappalette". (The symbols of the color value defined in the
header file "graph.h" such as _98GREEN are available for "color"'s
specification.)
32 0
+--------+--------+--------+--------+
│00000000│00BBBBBB│00GGGGGG│00RRRRRR│
+--------+--------+--------+--------+
R Red data (Lower byte)
G Green data (2nd byte)
B Blue data (3rd byte)
Each data mean the intensity of each color in range 0x00 - 0x3F.
The larger value means more intensity color.
The color values of each palettes are initialized at the application
start-up as follows. (System initial values)