[comp.sys.ibm.pc] EGA color palatte

brown@nicmad.UUCP (Mr. Video) (01/07/88)

I am interested in getting a complete list of the 64 colors available
for the EGA compatible display cards.

This is what I have been able to get from some software that I use
[the manual doesn't give a list of colors] and what I have been able to
figure out.  I decimal number is used [0-63] for picking the color.
I have guessed the it goes:

	MSB  LSB
	 rgbRGB   where r=32, g=16, b=8, R=4, G=2 and B=1
		  and rgb are secondary pins and RGB are primary pins

Along the same line, does the RGB connector (IBM connector mode 1) always
have 4 pins, ie, RGB and I [intensity].  The other connection of the RGB
connector (IBM connector mode 2) has 6 pins used, hence the 64 possible
colors.  And we also have RGB Analog, which I call RGBA.  What I would
like to know is what exactly are all the various types of RGB pinouts
and what their names are.  We have RGB, RGBI and RGBA bantered around,
so what exactly is what?  Is the 4 pin RGB called RGBI and is the 6 pin
RGB just called RGB?

Here is the color table as I know it.  Could someone please fill in the
blanks, or correct same?

	 0  Black
	 1  dark blue
	 2  Dark Green
	 3  cyan
	 4  dark red
	 5  magenta
	 6  yellow
	 7  Gray
	 8  real dark red
	 9  real blue
	10
	11
	12
	13
	14
	15
	16  real dark green
	17
	18  real green
	19
	20
	21
	22
	23
	24  dark cyan
	25
	26
	27  Blue  (really Cyan?)
	28
	29
	30
	31
	32  real dark red
	33
	34
	35
	36  real red
	37
	38
	39  Pink
	40  real dark magenta
	41
	42
	43  Dark Blue
	44
	45  magenta
	46  Orange
	47  Lavender
	48  dark yellow
	49
	50
	51  Light Green
	52  Red
	53  Magenta
	54  Yellow
	55  Amber
	56  dark gray
	57  dark blue
	58  Green
	59
	60  dark red
	61
	62
	63  White

The colors with cap first letters are what was listed as the colors with
the software.  The colors in lower case only are what I have seen or
guessed at, based on the binary color combinations.

Thanks in advance.
-- 
	       harvard-\	       ihnp4--\
Mr. Video               !uwvax.................!nicmad!brown
	       rutgers-/  terminus-/  decvax--/
"... a can of deodorant that measures nine on the Richter scale?"

Usenet_area_"Cs.I.Pc"@watmath.waterloo.edu (01/08/88)

From Usenet: watmath!clyde!rjs
From: rjs@moss.ATT.COM
Newsgroups: comp.sys.ibm.pc
Subject: Re: EGA color palatte
Summary: Color table filled in
Message-ID: <19827@clyde.ATT.COM>
Date: 8 Jan 88 16:55:26 GMT
References: <2310@nicmad.UUCP>
Sender: nuucp@clyde.ATT.COM
Distribution: na
Lines: 121

Mr. Video (brown@nicmad.UUCP) asked about the colors for EGA (in message
2310@nicmad.UUCP).  He provided a partial table of the 64 colors.  I
found a program on a BBS called KC-PAL (version 1.01) which lets you
look at each of the colors (16 at a time) by specifying the color numbers
for each of 16 rectangles on the screen.

My EGA monitor appears to take two different forms of color input (I'm
just starting to learn this stuff, so the following could be totally wrong).
The first uses 4 TTL signals to specify color.  These are Intensity, Red,
Green, and Blue (referred to by Mr. Video as RGBI).  The second uses 6 TTL
signals: primary Red, Green, and Blue, and secondary red, green, and blue
(referred to by Mr. Video as RGB).  The secondary signals seem to act as
intensifiers of the primary signals.  Thus with two signals per phosphor
color you get four levels of intensity for each of the three phosphor colors
(red, green, and blue).  These values can be thought of as follows:

	Intensity  Primary  Secondary  Appearance
	  Value    Signal    Signal    

	    0        off       off     Phosphor not illuminated
	    1        off       on      Phosphor slightly illuminated
	    2        on        off     Phosphor normally illuminated
	    3        on        on      Phosphor highly illuminated

The KC-PAL program actually reverses the meanings of intensity values
1 and 2 above, but I figured I would give them in the order of apparent
intensity.

I filled in the color table provided by Mr. Video below.  I added an
RGB column giving the intensity values for each of the phosphor colors
according to the above chart.  My interpretation of the colors is in
parentheses, while Mr. Video's appear as he presented them.  I'm not
very good at giving names to the colors I see, so you'll have to bear
with me on this.

Decimal	RGB	Apparent color

   0	000	Black
   1	002	dark blue
   2	020	Dark Green
   3	022	cyan
   4	200	dark red (deep red)
   5	202	magenta
   6	220	yellow
   7	222	Gray (dim white)
   8	001	real dark red (real dark blue)
   9	003	real blue (bright blue)
  10	021	(blue-green, mostly green)
  11	023	(pale blue)
  12	201	(pinkish red)
  13	203	(bluish magenta, sorta purple)
  14	221	(yellow, slightly greenish)
  15	223	(bluish white)
  16	010	real dark green
  17	012	(slightly lighter than dark blue)
  18	030	real green (bright pale green)
  19	032	(bright pale blue-green)
  20	210	(orange, rust)
  21	212	(purple)
  22	230	(bright yellow-green)
  23	232	(greenish white)
  24	011	dark cyan
  25	013	(bright blue)
  26	031	(bright bluish green)
  27	033	Blue (bright cyan, light sky blue)
  28	211	(muddy pink)
  29	213	(light purple)
  30	231	(bright yellow-green)
  31	233	(bright bluish-white)
  32	100	real dark red
  33	102	(blue w/slight purplish tinge)
  34	120	(green)
  35	122	(bluish white)
  36	300	real red (bright red)
  37	302	(shocking pink)
  38	320	(orangish-yellow)
  39	322	Pink (pinkish white)
  40	101	real dark magenta
  41	103	(bright blue)
  42	121	(bluish green)
  43	123	(dark sky blue)
  44	301	(orangish shocking pink)
  45	303	magenta (bright magenta)
  46	321	Orange (pale yellow-orange)
  47	323	Lavender
  48	110	(olive green)
  49	112	(slightly purpled blue)
  50	130	(bright yellow green)
  51	132	Light Green (bright)
  52	310	Red (orange)
  53	312	Magenta (bright)
  54	330	Yellow (bright)
  55	332	Amber (yellowish white)
  56	111	dark grey
  57	113	dark blue (light blue)
  58	131	Green (pale green)
  59	133	(bluish white)
  60	311	dark red (orangish red)
  61	313	(bright magenta)
  62	331	(muddy yellow)
  63	333	White (bright)


Color values 0-7 above account for the Intensity signal off in the RGBI
connector, while values 56-63 account for the Intensity signal on.

For more information on the KC-PAL program, contact:
	Kent Cedola
	2015 Meadow Lake Court
	Norfolk, VA.  23518

or look for it on a BBS near you.  I think Mr. Cedola is using KC_PAL as
a demo program in order to advertise the availability of a graphic library
for Microsoft C which he has developed.

	Robert Snyder
	{clyde|ihnp4}!moss!rjs

Disclaimer:  I don't know Mr. Cedola or his advertised products.  I am not
	representing the opinions of AT&T or any other entity besides myself
	in this note.

--- via UGate v1.6
 * Origin: watmath (221/163)

rjs@moss.ATT.COM (01/09/88)

Mr. Video (brown@nicmad.UUCP) asked about the colors for EGA (in message
2310@nicmad.UUCP).  He provided a partial table of the 64 colors.  I
found a program on a BBS called KC-PAL (version 1.01) which lets you
look at each of the colors (16 at a time) by specifying the color numbers
for each of 16 rectangles on the screen.

My EGA monitor appears to take two different forms of color input (I'm
just starting to learn this stuff, so the following could be totally wrong).
The first uses 4 TTL signals to specify color.  These are Intensity, Red,
Green, and Blue (referred to by Mr. Video as RGBI).  The second uses 6 TTL
signals: primary Red, Green, and Blue, and secondary red, green, and blue
(referred to by Mr. Video as RGB).  The secondary signals seem to act as
intensifiers of the primary signals.  Thus with two signals per phosphor
color you get four levels of intensity for each of the three phosphor colors
(red, green, and blue).  These values can be thought of as follows:

	Intensity  Primary  Secondary  Appearance
	  Value    Signal    Signal    

	    0        off       off     Phosphor not illuminated
	    1        off       on      Phosphor slightly illuminated
	    2        on        off     Phosphor normally illuminated
	    3        on        on      Phosphor highly illuminated

The KC-PAL program actually reverses the meanings of intensity values
1 and 2 above, but I figured I would give them in the order of apparent
intensity.

I filled in the color table provided by Mr. Video below.  I added an
RGB column giving the intensity values for each of the phosphor colors
according to the above chart.  My interpretation of the colors is in
parentheses, while Mr. Video's appear as he presented them.  I'm not
very good at giving names to the colors I see, so you'll have to bear
with me on this.

Decimal	RGB	Apparent color

   0	000	Black
   1	002	dark blue
   2	020	Dark Green
   3	022	cyan
   4	200	dark red (deep red)
   5	202	magenta
   6	220	yellow
   7	222	Gray (dim white)
   8	001	real dark red (real dark blue)
   9	003	real blue (bright blue)
  10	021	(blue-green, mostly green)
  11	023	(pale blue)
  12	201	(pinkish red)
  13	203	(bluish magenta, sorta purple)
  14	221	(yellow, slightly greenish)
  15	223	(bluish white)
  16	010	real dark green
  17	012	(slightly lighter than dark blue)
  18	030	real green (bright pale green)
  19	032	(bright pale blue-green)
  20	210	(orange, rust)
  21	212	(purple)
  22	230	(bright yellow-green)
  23	232	(greenish white)
  24	011	dark cyan
  25	013	(bright blue)
  26	031	(bright bluish green)
  27	033	Blue (bright cyan, light sky blue)
  28	211	(muddy pink)
  29	213	(light purple)
  30	231	(bright yellow-green)
  31	233	(bright bluish-white)
  32	100	real dark red
  33	102	(blue w/slight purplish tinge)
  34	120	(green)
  35	122	(bluish white)
  36	300	real red (bright red)
  37	302	(shocking pink)
  38	320	(orangish-yellow)
  39	322	Pink (pinkish white)
  40	101	real dark magenta
  41	103	(bright blue)
  42	121	(bluish green)
  43	123	(dark sky blue)
  44	301	(orangish shocking pink)
  45	303	magenta (bright magenta)
  46	321	Orange (pale yellow-orange)
  47	323	Lavender
  48	110	(olive green)
  49	112	(slightly purpled blue)
  50	130	(bright yellow green)
  51	132	Light Green (bright)
  52	310	Red (orange)
  53	312	Magenta (bright)
  54	330	Yellow (bright)
  55	332	Amber (yellowish white)
  56	111	dark grey
  57	113	dark blue (light blue)
  58	131	Green (pale green)
  59	133	(bluish white)
  60	311	dark red (orangish red)
  61	313	(bright magenta)
  62	331	(muddy yellow)
  63	333	White (bright)


Color values 0-7 above account for the Intensity signal off in the RGBI
connector, while values 56-63 account for the Intensity signal on.

For more information on the KC-PAL program, contact:
	Kent Cedola
	2015 Meadow Lake Court
	Norfolk, VA.  23518

or look for it on a BBS near you.  I think Mr. Cedola is using KC_PAL as
a demo program in order to advertise the availability of a graphic library
for Microsoft C which he has developed.

	Robert Snyder
	{clyde|ihnp4}!moss!rjs

Disclaimer:  I don't know Mr. Cedola or his advertised products.  I am not
	representing the opinions of AT&T or any other entity besides myself
	in this note.

mason@tc.fluke.COM (Nick Mason) (01/13/88)

Hi. I also have been working with the IBM-EGA card.

In article <2310@nicmad.UUCP> you write:
>
>	MSB  LSB
>	 rgbRGB   where r=32, g=16, b=8, R=4, G=2 and B=1
>		  and rgb are secondary pins and RGB are primary pins

The above is correct.
>
>Along the same line, does the RGB connector (IBM connector mode 1) always
>have 4 pins, ie, RGB and I [intensity].  The other connection of the RGB
>connector (IBM connector mode 2) has 6 pins used, hence the 64 possible
>colors.  And we also have RGB Analog, which I call RGBA.  What I would
>like to know is what exactly are all the various types of RGB pinouts
>and what their names are.  We have RGB, RGBI and RGBA bantered around,
>so what exactly is what?  Is the 4 pin RGB called RGBI and is the 6 pin
>RGB just called RGB?
>

The common use of RGB, RGBI, and RGBA as I have seen them used are:

RGB: a mode with 3 bits for 8 colors.

RGBI: the above plus "intensity" , a 4 bit mode for 16 colors.

RGBA: an analog mode with lots of colors.

RGB and RBGI are digital modes, typically tied to a specific type of
monitor that is only capable of producing specific discrete colors.
RGBA requires an analog monitor that can take a varying input voltage.
Ever notice the price differences between an analog and digital color
monitor?

I have never read about connector mode 1 and 2.  It looks interesting,
what is your reference?


My model of the EGA is as follows.  You can display 16 colors out of
the possible 64 colors at any time.  The 64 colors use the rgbRGB scheme
you have described above.  However, the EGA card has 4 memory planes,
corresponding to 4 bits per pixel.  .ie. each pixel on the display has
a value between 0 and F hex.  This is mapped into the Look UP Table (LUT)
that has 64 possible modes.  This LUT feeds the circuits that drive the
monitor and display colors on the screen.

For example, :

pixel value   Default LUT   a blue/gray scale LUT
	0	0		0
	1	1		8
	2	2		1
	3	3		18
	4	4		11
	5	5		3
	6	6		29
	7	7		F
	8	38		1D
	9	39		2B
	A	3A		39
	B	3B		19
	C	3C		9
	D	3D		1B
	E	3E		6
	F	3F		7

The pixel value is the value in the bit planes, the LUT are the 16 mapped
values out of the 64 possible.

To work through a few values,
pixel=0, default LUT=0H=rgbRGB=000000=black.
pixel=1, default LUT=1H=rgbRGB=000001=blue.
pixel=2, default LUT=2H=rgbRGB=000020=green.
etc.
>Here is the color table as I know it.  Could someone please fill in the
>blanks, or correct same?
I have looked at all of the colors but I have simply classified them
into green, blue, red, orange, etc. since I am no color expert and
don't have enough names for the x shades of green I found.

Hope this helps.