Chris ritt:
Hey, I know there are a ton of other ANSI colors besides "bold,
underline, blink" red, magenta, green, blue, cyan, yellow and green.
Anyone know how to get those other colors? the background ones.. etc?
I figure, I may add them.
I was fiddling around with these a while back, just to see what codes
I could find (using CRT as my terminal emulator under Windows), and I
got these values:
0 = normal
1 = bright
4 = underline
5 = blink
7 = inverse
8 = invisible?
22 = no bright
24 = no underline
25 = no blink
27 = no inverse
28 = no invisible?
30 = black
31 = red
32 = green
33 = yellow
34 = blue
35 = magenta
36 = cyan
37 = white
40 = black (bg)
41 = red (bg)
42 = green (bg)
43 = yellow (bg)
44 = blue (bg)
45 = magenta (bg)
46 = cyan (bg)
47 = white (bg)
They're all the numbers that go in the /e[#m escape sequence. You can
use any combination of codes you like as long as the numbers are
separated by colon chars (;), except that each colour (or background) will
override any before it in the sequence, and the 'no ...' ones
actually turn off their corrosponding effect. For example the string:
"/e[1;4;34;45mBright blue on magenta, underlined ... /e[24msame colours, not
underlined"
..prints what it says how it says, and:
"/e[1;43;25;32;0mBlah"
..doesn't actually do anything.. I think. The one thing one must always
remember, if to end each line with a "/e[0m" otherwise backgrounds have
a tendency to bleed.
You should be able to figure out how it works.
Please, anyone, tell me if any of the codes are wrong, or if you know
of any others to add to my collection.
Matty
-----
I'm not dead.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.