delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/31/15:13:49

X-Spam-Check-By: sourceware.org
Date: Thu, 31 Aug 2006 15:11:29 -0400
From: "Kenneth Nellis" <knellis AT syntek-usa DOT com>
Subject: RE: Color Schemes
In-reply-to: <83FFB2C3A0EAAB418A35DFA0FBCD60EC02312FAA@nsc-exch.nationalsystems.com>
To: <cygwin AT cygwin DOT com>
Message-id: <006001c6cd31$44827610$190414ac@idirect.net>
MIME-version: 1.0
X-Mailer: Microsoft Office Outlook 11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

<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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019