home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / terminal / 1505 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  2.3 KB

  1. Path: sparky!uunet!gatech!darwin.sura.net!cs.utk.edu!shuford
  2. From: shuford@cs.utk.edu (Richard Shuford)
  3. Newsgroups: comp.terminals
  4. Subject: Re: Colour in VT-100?
  5. Followup-To: comp.terminals
  6. Date: 8 Jan 1993 05:36:45 GMT
  7. Organization: University of Tennessee, Knoxville--Dept. of Computer Science
  8. Lines: 47
  9. Distribution: world
  10. Expires: 28 Feb 1993 22:23:26 GMT
  11. Message-ID: <1ij3tdINN9f9@CS.UTK.EDU>
  12. References: <tmorris.726292471@bruny>
  13. NNTP-Posting-Host: carlsberg.cs.utk.edu
  14. Summary: not as such, but...
  15. Keywords: VT100, color
  16.  
  17. In article <tmorris.726292471@bruny>,
  18.  tmorris@bruny.cc.utas.edu.au (Tim Morris) writes:
  19. >
  20. > Is it possible to select different colours using standard VT-100 codes?
  21. > How do monochrome terminals react to these codes?
  22.  
  23. Well, the VT100 has a black-and-white screen, so don't expect much in
  24. the way of pastel hues.  Some of its descendents, such as the VT241,
  25. can display colors, but require use of the ReGIS graphics protocol to
  26. change them.
  27.  
  28. The ANSI X3.64 standard itself does not contain any definitions for
  29. changing color, but the corresponding international standard, ISO
  30. DP6429, defines a way to specify colors using the SGR (Set Graphics
  31. Rendition) command.
  32.  
  33. These 6429-style color functions are in fairly wide use.   Two pieces
  34. of software that employ them are Microsoft's ANSI.SYS driver for MS-DOS
  35. and Joe Doupnik's MS-Kermit program.  They take the form:
  36.  
  37.     ESC [ Fg ; Bg m
  38.  
  39. where Fg controls the foreground color and Bg controls the background.
  40. These are expressed as ASCII decimal digits, not binary quantities.
  41. Construct the Fg parameter by taking 30 and adding values for the primary
  42. colors to it; construct Bg by adding primaries to 40.  (The "m" is a
  43. literal lowercase M.)
  44.  
  45.    1 = red
  46.    2 = green
  47.    4 = blue
  48.  
  49. You can put other attributes in the string, too.
  50.  
  51. So, cyan (green + blue) foreground on black background would be
  52.  
  53.     ESC [ 36 ; 40 m
  54.  
  55. (no actual spaces appear in the control string, of course)
  56.  
  57. Among other places, this is documented in part of MS-Kermit documentation
  58. in the file MSVIBM.VT, which you can obtain from WATSUN.CC.COLUMBIA.EDU.
  59.  
  60. -- 
  61.  ...Richard S. Shuford  |"He who oppresses the poor to increase his wealth and
  62.  ...shuford@cs.utk.edu  | he who gives gifts to the rich--both come to poverty.
  63.  ...Info-Stratus Coord. | Proverbs 22:16  NIV
  64.