bright@Data-IO.COM (Walter Bright) (04/26/89)
Does anybody know, or have a reference to, what the RGB values are for the 64 color EGA palette? I.e., basically what is the table: enum color { RED, GREEN, BLUE, MAX }; int egapalette[64][MAX] = { ??????? }; Thanks in advance...
mason@tc.fluke.COM (Nick Mason) (04/29/89)
In article <1956@dataio.Data-IO.COM> bright@dataio.Data-IO.COM (Walter Bright) writes: >Does anybody know, or have a reference to, what the RGB values are >for the 64 color EGA palette? I.e., basically what is the table: > >enum color { RED, GREEN, BLUE, MAX }; > >int egapalette[64][MAX] = { ??????? }; > >Thanks in advance... 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 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. Also: 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) Nick Mason/ms272G/John Fluke Mfg Co/Box C9090/Everett WA 98206 USA mason@tc.fluke.COM UUCP: {{cornell,decvax,sdcsvax,tektronix,utcsrgv}!uw-beaver} \ {microsoft,gatech!sb1,hplabs!lbl-csam,decwrl!sun,sunup} - !fluke!mason {ssc-vax,hplsla,wavetek,uw-vlsi,tikal} / ARPA: fluke!mason@uw-beaver.ARPA BITNET: "fluke!mason@uw-beaver.ARPA"@PSUVAX1.bitnet "Avoid the Dull and Ignorant"