Article View: alt.msdos.programmer
Article #489Re: Color ANSI codes for PC BBS terminals
From: L. Scott Emmons
Date: Wed, 09 May 1990 16:13
Date: Wed, 09 May 1990 16:13
49 lines
1939 bytes
1939 bytes
In article <29642@ut-emx.UUCP> wras@walt.cc.utexas.edu (Steve Mariotti) writes:
>Can anyone point me out to where I can find the ANSI codes for sending
>color information? I'm writing a sort of ANSI terminal that I want to
>provide with color support, as well as all the standard bold, u/l, inverse
>cursor addressing, etc features of vt100.
First, try your dos manual...under ansi.sys. If not there, try a "programming
reference manual" (even radio shack's if you plan to buy one: BIOS is the same
and the book is the cheapest I've seen).
Second, here's a list:
code: ESC[*;...;*m
param fg/bg color
----- ----- -----
0 both all attr off (white on black)
1 fg high intensity
5 both blink
7 both reverse video
8 both hidden
30 fg black
31 fg red
32 fg green
33 fg brown (yellow in high intensity)
34 fg blue
35 fg magenta
36 fg cyan
37 fg white
40-47 bg (same as 30-37, but background)
You can mux colors, for example:
ESC[0;33;44;1;5m is yellow over blue flashing (and reset)
Or just change a single attr:
ESC[32m
And before changing, make sure you
ESC[0m to clear prev. attributes
unless you only want to change one bit of it.
L. Scott Emmons
---------------
...[!ucbvax]!ucdavis!csusac!{scott,athena!emmonsl}
ucdavis!csusac!{scott,athena!emmonsl}@ucbvax.berkeley.edu
Technical Details
Message-ID:
<1990May9.161341.16433@csusac.csus.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!ucsd!ucbvax!ucdavis!csusac!References:
<8899@hubcap.clemson.edu> <551@venice.SEDD.TRW.COM> <1990Apr30.230005.11483@Octopus.COM> <29642@ut-emx.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!ucsd!ucbvax!ucdavis!csusac! From: emmonsl@athena.csus.edu (L. Scott Emmons) Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc.programmer Subject: Re: Color ANSI codes for PC BBS terminals Message-ID: <1990May9.161341.16433@csusac.csus.edu> Date: 9 May 90 16:13:41 GMT References: <8899@hubcap.clemson.edu> <551@venice.SEDD.TRW.COM> <1990Apr30.230005.11483@Octopus.COM> <29642@ut-emx.UUCP> Reply-To: emmonsl@athena.UUCP (L. Scott Emmons) Organization: California State University, Sacramento Lines: 49