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