


The precise algorithm used to tint the palettes can be found in dcolors.c, a part of the Doom utilities. This could have been fixed subtracting 1 while adding the STARTPAL (and therefore not while capping the palette). Since the computer palette will always be at least 1 + START(RED|BONUS)PALS, the first palette is skipped. Green tint, used when the radiation suit is being worn.Īn examination of the Doom source code reveals that the unused palettes (1 and 9) were likely intended to be the first levels of the red and yellow tinting effects, but because of the logic used in the palette code, they are never used: Used very briefly as the player picks up items.Ģ5%, 37.5%, and 50% of RGB(215, 186, 69). Used to show pain when the player is hurt, and reddens the screen when the player picks up a berserk pack.Įach of these palettes tints the screen red progressively by 1/9×100%, so the highest pain palette makes the screen 89% red, by RGB(255, 0, 0). The Doom PLAYPAL contains a total of 14 palettes, where each palette has a specific function: However, a COLORMAP change can be combined with a PLAYPAL change with no issues. picking up a radiation suit (Green tint) and a berserk pack (red tint) will not display a yellow tint.

Since only one palette can be displayed at a time, any effects that use PLAYPAL cannot be combined e.g. Any changes to the PLAYPAL will be reflected in the COLORMAP, and if those changes are significant, they will require the COLORMAP to be rebuilt in order to remain consistent with the palette. The COLORMAP resource is built using the PLAYPAL and consists of a number of tables of indices into the palette through which colors can be remapped for sector lighting, distance fading, and partial screen color changes (such as the invulnerability effect). Each of these color components (red, green, and blue) range between 0 and 255. Each palette in the PLAYPAL lump contains 256 colors totaling 768 bytes, where each color is broken into three unsigned bytes.

Since the Doom engine can only display a maximum of 256 simultaneous colors, it performs a series of palette swaps to achieve these effects. The PLAYPAL lump is a set of color palettes the Doom engine uses to set the main colors for all graphics, including full color fades and tinting effects. Doom palette 0, by rows, with each color numbered
