Color Schemes

Kenneth Nellis knellis@syntek-usa.com
Thu Aug 31 19:30:00 GMT 2006


<originalMessage>
<snip>
Is that an exhaustive list of colors?
30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
What about 38 and 39?
I could just try it, but knowing my luck, it would just lock up the whole
terminal forever.
</snip>
</originalMessage>

FWIW, color space is 3-dimensional and with VDT's, the dimensions are red,
green, and blue. The ANSI color controls allow each dimension to be set full
on or full off (binary) with no in-betweens giving 2^3 = 8 possible colors.
For ANSI, these are numbered 0 to 7, adding 30 for foreground colors or 40
for background colors. The numbers are not arbitrary:
0 = 0 + 0 + 0 (black)
1 = 0 + 0 + 1 (red)
2 = 0 + 1 + 0 (green)
3 = 0 + 1 + 1 (red+green=yellow)
4 = 1 + 0 + 0 (blue)
5 = 1 + 0 + 1 (red+blue=magenta)
6 = 1 + 1 + 0 (green+blue=cyan)
7 = 1 + 1 + 1 (red+green+blue=white)

--Ken Nellis


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list