home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 376_01 / os2tool.000 / COLOR.TXT < prev    next >
Text File  |  1992-08-08  |  2KB  |  48 lines

  1.                                              COLOR [DUAL MODE]
  2.      
  3.      NAME COLOR - set the colors on the display
  4.      
  5.      
  6.      SYNTAX
  7.      
  8.      color [prefix]basiccolor on [prefix]basiccolor
  9.      where
  10.           prefix = LIGHT_ | DARK_
  11.           basiccolor =
  12.           [BLACK|RED|GREEN|YELLOW|BLUE|MAGENTA|CYAN|WHITE|DEFA
  13.           ULT]
  14.      
  15.      USAGE
  16.      
  17.      Color is  used to set the foreground and background color
  18.      of a  session. It  affects only  the session, where it is
  19.      run. If  you want  to set the colors in all sessions, you
  20.      must create  a command file, where the color-command with
  21.      desired parameters  is run  and then you must modify your
  22.      config.sys. If  you set  as the  last parameter  of  your
  23.      protshell-line the  following "  /K cmd-file",  OS/2 will
  24.      run the cmd-file every time you start a new session. Note
  25.      that starting  an  OS/2  Window  does  not  start  a  new
  26.      session.
  27.      
  28.      Color uses  Vio-calls except  in OS/2  Window, where  the
  29.      call used  for changing  colors does  not work.  In  OS/2
  30.      Window color  uses ANSI-escape sequences, which limit its
  31.      capabilities to  the basic colors. E.g. RED is supported,
  32.      but not LIGHT_RED or DARK_RED.
  33.      
  34.      Color uses  ANSI escape  sequences. If the ANSI sequences
  35.      are off,  color sets  ANSI on  for the  duration  of  the
  36.      program and restores the original situation at the end of
  37.      the program.  OS/2 seems  to work  in a random fashion in
  38.      this kind  of situations.  Sometimes  the  colors  change
  39.      sometimes not. The color sets the current cursor position
  40.      to the  bottom of  the screen,  because with  my  version
  41.      (1.21) the  ANSI- sequences  worked every  time, when the
  42.      cursor was at the bottom of the screen. Still CLS-command
  43.      seems to  reset all color to their default value, if ANSI
  44.      is off.
  45.      
  46.      SEE ALSO
  47.      clear, normal
  48.