graphics.hlp (Topic list)
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. There is
     no error return.
                                    -♦-