cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/14/05:23:27

Sender: crough45 AT amc DOT de
Message-Id: <97Aug14.111947gmt+0100.17071@internet01.amc.de>
Date: Thu, 14 Aug 1997 10:21:32 +0100
From: Chris Croughton <crough45 AT amc DOT de>
Mime-Version: 1.0
To: tudor AT cam DOT org
Cc: djgpp AT delorie DOT com
Subject: Re: mistake in COLOR enum in conio.h

Vic wrote:

> Which, as it turns out, is not a mistake... Darkgray is light black and
> lightgray is dark white...whis confuses the hell outta me... not to be
> picki or anything, but why isn't orange dark yellow or pink light red ??

Well, pink is in fact red with white added, as opposed to a brighter
red (and 'bright' is a more accurate term than 'light' for the PC 
colours.  And orange isn't 'dark yellow', it's "yellow with red added"
or "yellow with less green"

In numerical terms, it's something like:

  red		R:50 G:0  B:0
  pink		R:50 G:25 B:25  i.e add a bit of the complementary colours
  yellow	R:50 G:50 B:0   equal red and green
  orange	R:65 G:35 B:0   more red than green

> is there any hardware reason for the light/dark gray stuff ?

Yes.  I posted this before.  In the old CGA and EGA cards and mointors
you had an 8-bit value per byte (still do in text mode) for the
attribute
(colour).  This contained:

 1 bit  foreground brightness
 1 bit  flashing (sometimes background brightness)
 3 bits foreground
 3 bits background

The 3 bit colours were red, green and blue, giving the 'dark' colours.
the one called 'lightgray' was in fact the standard 'white'.  Then if
you set the 'bright' bit, you got:

  bright black
  ...
  bright white.

For some reason known only to IBM, they thought that the "dark yellow"
looked not very good, so they frigged the monitors to display it as
brown (added a bit of red, so it's actually a dark orange).  They also
thought that sing "bright black" is still really black they would add
another greyscale colour and make it a dark grey, but of course its
numerical value made it 'higher' than the standard 'white' so the order
appeared reversed.

Now, with SVGA monitors becoming so common, it makes not much sense.  
But back then it really did make hardware sense to do it like that...

Does that help?

Chris C

- Raw text -


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