From: ne 12:26 Subject: Re: TECH: RGB Values for Color/Luminance pairs [posted and e-mailed] Patrick Maloney (maloneyXXX@merlin.albany.net) wrote: > With regard to this blue/green problem, I got the AtariWin800 source > and initial tests indicate I just have to change the palette (as someone > else indicated). That was me, I think. :-) > Anyone know where I can get info on the appropriate RGB values to > ues for each color/luminance pair? That's a tricky question to answer, because the appearance of each hue/luminance pair will vary depending on the way the tint, brightness, and contrast are set on your TV, as well as whether you're using NTSC or PAL. Apparently even the individual Atari can be a factor, depending on how the potentiometer is set. I used to adjust my TV settings to get what I thought were the best hues, based on what the references said they were, and to make the luminances distinguishable from each other. I wrote a simple program to display all 256 colors on the screen at once, using display list interrupts. Whenever I wanted to adjust the settings on my TV to get the best display for my Atari, I would run that program so I could see all of the colors at once while adjusting the TV settings. Unfortunately, my Atari disk drives died long ago, and I never replaced them, so I can no longer run my old Atari programs. Several months ago I bought a Snappy! digitizer for my PC, for the sole purpose of capturing Atari screens on my PC so I could determine which RGB value to use for each hue/luminance pair. I played with the brightness and contrast settings of the Snappy! program to make each luminance distinct, but I don't think I adjusted the tint. And instead of capturing all 256 colors at once, I just captured all 16 luminances of the hues at once, but I'm not sure if the colors are accurate. For example, I remember hue 15 as being brownish, but the screen captures I made show it as greenish, which isn't right. One of these days I'm going to play with Snappy!'s settings to get a better result on *all* of the hues and luminances, then make a new set of screen captures to work with. Anyway, I think the hue you're most interested in is hue 10, variously described in the Atari literature as "blue-grey" (Mapping the Atari, p. 164), "turquoise" (Atari XL User's Handbook, p. 215; Atari 400/800 Basic Reference Manual, p. 50; and GTIA Chip NTSC, sheet 4), or "blue-green" (Atari System Reference Manual, Chapter 8). The Atari800Win and Stella emulators display hue 10 as greenish, rather than bluish. All you really need to do is redefine the RGB values for color 160 (hue 10, luminance 0) through color 175 (hue 10, luminance 15). At least, those are the only colors you need to worry about "with regard to this blue/green problem." As someone else indicated in another post, Star Raiders uses color 160 (hexadecimal A0) for the background when shields are in use. Thus, if you change that color, Star Raiders on the Atari800Win emulator should look more like what you're used to seeing on the Atari. If you do a screen capture of all 16 luminances of hue 10 (as I did), you can pull it up in a paint program and inspect the RGB values, then change the palette in Atari800Win. That sounds simple, but it turns out to be complicated. The screen capture I made of hue 10 contains 5173 unique colors! When I cut luminances 1 to 15 out of the image, the part of the image showing just color 160 (luminance 0) still has 432 unique colors! So I reduced the cropped image to a depth of 256 colors, optimized to the nearest colors, resulting in 20 unique colors. I reduced the new image to a depth of 16 colors, optimized to the nearest colors. Finally, I examined the RGB values of these 16 colors, added them together, and divided by 16 to get these averages: R=0, G=43, B=130. When I create a color with those RGB values and put it next to the original cropped screen capture of color 160 (in all of its glorious 432 colors), it does look like a pretty good fit. However, the RGB values I came up with depended on Snappy's settings when I made the original screen capture, the way I reduced the color depth, and the way I averaged the resulting colors together. (I assumed that the 16 colors were used in equal proportions.) It's likely that someone else could use this same technique, yet end up with different RGB values. And then there's the issue of NTSC versus PAL colors. Nevertheless, using the technique described above, I came up with the following RGB values for the 16 luminances of hue 10: color 160 (hue 10, luminance 00) : R=000, G=043, B=130 color 161 (hue 10, luminance 01) : R=000, G=055, B=144 color 162 (hue 10, luminance 02) : R=004, G=074, B=156 color 163 (hue 10, luminance 03) : R=025, G=085, B=163 color 164 (hue 10, luminance 04) : R=044, G=100, B=172 color 165 (hue 10, luminance 05) : R=062, G=115, B=185 color 166 (hue 10, luminance 06) : R=082, G=129, B=200 color 167 (hue 10, luminance 07) : R=099, G=147, B=214 color 168 (hue 10, luminance 08) : R=104, G=154, B=213 color 169 (hue 10, luminance 09) : R=121, G=169, B=232 color 170 (hue 10, luminance 10) : R=138, G=185, B=246 color 171 (hue 10, luminance 11) : R=151, G=203, B=253 color 172 (hue 10, luminance 12) : R=167, G=219, B=255 color 173 (hue 10, luminance 13) : R=182, G=232, B=255 color 174 (hue 10, luminance 14) : R=198, G=247, B=255 color 175 (hue 10, luminance 15) : R=216, G=255, B=255 Michael Rideout