Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
_selectpalette
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
The selectpalette function works only under the video modes
$MRES4COLOR and $MRESNOCOLOR. A palette consists of a selectable
background color (color 0) and three set colors. Under the
$MRES4COLOR mode, the <number> argument selects one of the four
predefined palettes shown below:
$MRES4COLOR Palette Colors
────────────── Color Index ──────────────
Palette
Number Color 1 Color 2 Color 3
0 Green Red Brown
1 Cyan Magenta Light gray
2 Light green Light red Yellow
3 Light cyan Light magenta White
The $MRESNOCOLOR video mode is used with black-and-white displays,
producing palettes consisting of various shades of gray. It will
also produce color when used with a color display. The number of
palettes available depends upon whether a CGA or EGA hardware
package is employed. Under a CGA configuration, only the two
palettes shown below are available:
$MRESNOCOLOR Mode CGA Palette Colors
────────────── Color Index ──────────────
Palette
Number Color 1 Color 2 Color 3
0 Blue Red Light gray
1 Light blue Light red White
Under the EGA configuration, the three palettes shown below are
available in the $MRESNOCOLOR video mode:
$MRESNOCOLOR Mode EGA Palette Colors
────────────── Color Index ──────────────
Palette
Number Color 1 Color 2 Color 3
0 Green Red Brown
1 Light green Light red Yellow
2 Light cyan Light red Yellow
Note that with an EGA in $MRESNOCOLOR video mode, Palette 3 is
identical to Palette 1.
Return Value
The function returns the value of the previous palette.
-♦-