qpgraph.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 Function
  Summary Details Example                                   Back
 
  Argument
 
    number     Selects predefined palette
 
  Returns
 
    Integer    Previous palette number
 
  Description
 
    The _SelectPalette function works only in the _MRes4Color,
    _MResNoColor, and _OResColor video modes. In _MRes4Color and
    _MResNoColor modes, a palette consists of a suitable background
    color (color 0) and three fixed foreground colors.
 
    In _MRes4Color mode, the number argument selects one of the four
    predefined palettes shown below:
 
                         Color Index
                         ═══════════
      Palette
      Number     Color 1        Color 2          Color 3
      ═══════    ═══════════    ═════════════    ════════════
      0          Green          Red              Brown
      1          Cyan           Magenta          White
      2          Light Green    Light Red        Yellow
      3          Light Cyan     Light Magenta    Bright White
 
    The _MResNoColor graphics mode is normally used with black-and-white
    composite monitors, with palettes consisting of shades of gray. This
    mode will produce color when used with a color monitor. The number
    of different palettes available depends on whether CGA or EGA
    hardware is used. With a CGA configuration, the two different
    palettes shown in the table below are available. Note that although
    four palette numbers are listed, palettes 0 and 1 are identical, as
    are palettes 2 and 3.
 
                         Color Index
                         ═══════════
      Palette
      Number     Color 1       Color 2      Color 3
      ═══════    ══════════    ═════════    ════════════
      0          Blue          Red          White
      1          Blue          Red          White
      2          Light Blue    Light Red    Bright White
      3          Light Blue    Light Red    Bright White
 
    With an EGA, the three different palettes shown in the table
    below are available in the _MResNoColor video mode. Note that
    although four palette numbers are listed, palettes 1 and 3 are
    identical.
 
                         Color Index
                         ═══════════
      Palette
      Number     Color 1        Color 2      Color 3
      ═══════    ═══════════    ═════════    ═══════
      0          Green          Red          Brown
      1          Cyan           Magenta      White
      2          Light Green    Light Red    Yellow
      3          Cyan           Magenta      White
 
    In _OResColor graphics mode, an argument number in the range 0-15
    selects the foreground color from among the standard colors listed
    below. The background color is always black in this mode.
 
      Index    Color      Index    Color
      ═════    ═══════    ═════    ═════════════
      0        Black      8        Dark Gray
      1        Blue       9        Light Blue
      2        Green      10       Light Green
      3        Cyan       11       Light Cyan
      4        Red        12       Light Red
      5        Magenta    13       Light Magenta
      6        Brown      14       Yellow
      7        White      15       Bright White
 
    _OResColor mode is a high-resolution graphics mode available with
    Olivetti(R) graphics adapters found in most Olivetti computers and
    in the AT&T(R) 6300 series computers.
 
  _GrStatus Returns
 
    _GrInvalidParameter, _GrNotInProperMode