The grayscale one you're referring to is not the one that is used.Hirogen2 wrote:In some stupid Doom palette editing util, it divided the 256 colormap up into 32 ones or so... which were red, green, etc. one was grayscale.
[Disclaimer]The following is conjecture based on my personal observations and assumptions. If it's wrong... bite me.[/Disclaimer]
Here's how it works: To render each texel, Doom uses one of the 256-color palettes from the PLAYPAL lump (depending on whether you've recently been injured or picked up an item, or if you're wearing the rad suit), but before the color is rendered to the screen, one more translation is done on it. The translation depends on how bright the texel in question should be, and whether you're currently under the effects of an invurn sphere.
If not, the color is located in the top area of the COLORMAP lump. If you look carefully, you'll see that a single row in this lump contains 256 colors, and that the top row contains the exact same colors as found in the first palette in the PLAYPAL lump. Hence, any color chosen from the default palette will use one of those first 256 color for its translation. Next, the game decides how bright the texel should be depending on the light in the area and how far from the camera it is. The darker it is, the further down it goes in the COLORMAP table, using the column the original color was found in. From this, you can see that red will fade down to brown, blue will fade down to gray, etc. Once the brightness is determined the texel is rendered to the screen using the entry in the COLORMAP.
On the other hand, if you have an invurn sphere, instead of shifting down depending on brightness, the brightness is completely ignored. Instead, the game jumps down to the 2nd-to-last row (the last is completely black) and uses the color it finds there to render the texel. This fits perfectly because when you have the invurn, 1) All colors are grayscale, 2) The brightness is reversed from the normal palette, and 3) Distance and brightness don't matter.
AFAIK, ZDoom doesn't use these translations anymore, which is why you can't change the palettes with a new PLAYPAL, and why each light level is distinct, rather than going in 16-step jumps.
Here's an image of DOOM.WAD's COLORMAP so you can see what I'm talking about...