|
Release history
IntroductionI wrote this document up for posting in the Direct-L Macromedia Director developers' mailing list. I'd been doing research on custom 8-bit palettes for Director that work on both the Mac and Windows, and I wanted to get comments on what I've discovered and deduced. I didn't get any substantive feedback, but I still think the document is useful, and so am posting it here (after many updates). I had to do some extrapolation and guessing at times; please let me know if I've missed/misstated something, or if there are some details that could be stated better. ResearchAs a starting point, the following is from the Director 5.0 for Windows ReadMe file:
And, from Macromedia technical note 3174 (no longer available):
Palette Test MovieI've created a test Director 6.0 movie that tries out various palette combinations. It allows you to switch between four color palettes, two with the Windows 20 colors preserved and two with only black and white preserved. You can execute the switch with or without a fade. In addition, you can show a system alert, or invoke the Lingo "pause" command immediately followed by "continue". You can run it on the Mac or the PC, but it's really most useful when showing Win95 wierdnesses. (To see a picture of the movie, click here. To download the movie as a Windows ZIP archive, click here. To download the movie as a Macintosh SIT file, click here. You'll need Director 6 to try either out.) I've played with this movie quite a bit under Windows 95, both with [Palette]Animation=1 and [Palette]Animation=0. I discovered a number of things:
Other InformationWhen displaying 8-bit images, the Mac "likes" to have color 0 be white and color 255 to be black. "Likes" means that for the most part the OS can handle palettes where this isn't true, but some application software requires it. Director, in particular, won't let you edit colors 0 and 255 to be anything but white/black, and in fact when you try to import an image where this isn't true Director will require you to remap it to another, conforming palette. So, for our purposes, 0 is white and 255 is black. All other color positions may be played with at will; your projects will have the correct colors on the Mac. If the colors the system wants for its own use aren't available then it will to a black-and-white appearance; the system won't mess with Director's colors. One note: if "Animate in Background" is turned on and you bring another application to the front, the second application's colors may be messed up by Director insisting on its set of colors. Windows "likes" to have color 0 be black and color 255 to be white (I believe it actually demands it). It also considers the additional 18 colors from 1 to 9 and from 246 to 254 to be fair game for system interface use; by default the low number colors are dark pastels and the high number colors are bright primaries. If you look at the "System - Win" palette in Director (Mac or Win), you'll find that the opposite of what I said is true: the low 10 colors are bright, with number 0 being white, and the high 10 colors are dim, with number 255 being black. Plus, colors 8, 9, 246 and 247 are marked as "reserved," and so aren't used when images are mapped to that palette. The actual colors are (in decimal RGB): Index Red Green Blue 0 255 255 255 1 0 255 255 2 255 0 255 3 0 0 255 4 255 255 0 5 0 255 0 6 255 0 0 7 128 128 128 8 160 160 164 (RESERVED) 9 255 251 240 (RESERVED)... 236 other colors ... 246 166 202 240 (RESERVED) 247 192 220 192 (RESERVED) 248 192 192 192 249 0 128 128 250 128 0 128 251 0 0 128 252 128 128 0 253 0 128 0 254 128 0 0 255 0 0 0 (To see the "System - Win" palette from Director, click here.) The same set of colors can be found in DeBabelizer 1.6.5 for the Mac in the "Windows Default 256" palette, except that the order is reversed, the "236 other colors" are all different, and all the "128"s in Director's colors 249 through 254 become "191"s in DeBabelizer's colors 1 through 6. I've heard that some of the static interface colors are darker in Win95 than in Win3.1, so perhaps DeBabelizer's color palette is based on Win3.1's palette. (To see the "Windows Default 256" palette from DeBabelizer, click here.) The reason for Director for Windows having the opposite color order from Windows itself is that, before displaying an image, DFW reverses both the color order in the requested palette and the color order in displayed images. In other words, the color with index X in a custom palette is actually written into the display palette at index (255 - X), and each pixel in each displayed image is subtracted from 255 before displaying (sounds complex, but I'm sure it takes few CPU cycles). Also, when importing images, PC format images (such as .BMP) have their palettes and pixels reversed before being added to the cast, preparing them to be reversed again for display. All this tap dancing means that a single set of images and palettes (with color 0 white and color 255 black) can work on both platforms. Note that all the colors in this list "make sense" (are all combinations of 0 and one of 128, 192 or 255) except colors 8, 9, 246 and 247, which are the "reserved" colors in Director's palette (see the Director 5.0 ReadMe quotation above). If the current palette has the Windows' 20 colors, and Windows user chooses a different desktop color "scheme", then Windows may change these four color slots in order to show the scheme. Because of this, these four color slots are hazardous (using them on a machine with custom appearance colors would have bad results). I don't think the other 16 colors are liable to being changed. You can actually play with all 254 colors in Windows (excepting black and white) as long as you never have any system component (e.g. dialog, alert, or QuickTime controller) visible, and you don't mind any visible background applications looking bad. If you've changed the reserved 20 colors and a system component appears then the component will look bad. Whew. SummarySo, what does all this mean?
QuestionsSo, the remaining questions are:
If you have any info on these questions, or comments on the rest of the document, please let me know. LinksMacromedia
|
||||||||||||||
| Copyright © 2005 Daniel Griscom |
Page modified September 30, 2005 |
Site modified July 04, 2006 |
Site
design myriadweb.com |