X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc6b5,c932c3d68d52886d X-Google-Attributes: gidfc6b5,public X-Google-Thread: f996b,c932c3d68d52886d X-Google-Attributes: gidf996b,public From: wyv@cris.com (wyv) Subject: Re: Color IRC codes? Date: 1996/12/01 Message-ID: <57r1ko$g34@herald.concentric.net>#1/1 X-Deja-AN: 201656930 references: <57crk6$h3q@news1.epix.net> <57da93$lm3@herald.concentric.net> content-type: Text/Plain; charset=US-ASCII organization: ecl mime-version: 1.0 newsgroups: alt.ascii-art,alt.irc In article , rra@cs.stanford.edu says... > >In alt.irc, wyv writes: > >> You're missing a bunch of colors there, here's all the color codes I've >> got. "BG" is "background" abbrev'd, and ^[ is always the literal Ctrl+[ >> character, which is not displayed here: > >It's known as ESC or Escape. :) Yeah, I know, but that doesn't exactly matter. ># Attribute codes have the form xx;xx;xx where one code is the attribute, ># another is the foreground color, and the third is the background color. ># If only one or two of those three classes of attributes is to be ># changed, the rest can be omitted. The codes are as follows: ># ># Attribute codes: ># 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed ># Text color codes: ># 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white ># Background color codes: ># 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white ># ># To change text attributes, send the sequence: ># ># ESC [ m ># ># leaving off the spaces, where ESC is C-[ or octal character 033 and ># is one of those attribute codes. > >For example, use ESC [ 1;32 m (no spaces) to turn text bright green. (Or, >equivalently, ESC [ 32;1 m ). Well, thanks for pointing that (xx;xx;xx) part out to me, I wasn't *quite* aware of that, although I knew that the ;'s in the ANSI color codes had something to do with how the string worked. :) Wow, I can now go share my knew knowledge. ;) Oh yeah, n I've never really had any trouble with the "longer" way of doing it, which is, basically, doing everything separately. ^[[31m^[[42m^[[05mHello^[[0m Will output "Hello" with red text, a green background, and blinking just as well as ^[[31;42;05mHello^[[0m will, if I understood you correctly. Please correct me if I'm wrong. :P wyv