Doom Wiki
(Added Hexen PLAYPAL info.)
m (→‎top: clean up)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Image:DoomPalette0.PNG|right|thumb|Doom Palette 0]]
+
[[file:DoomPalette0.PNG|right|thumb|Doom Palette 0]]
[[Image:Doompal.png|right|thumb|Doom palette 0, with each color numbered]]
+
[[file:Doompal.png|right|thumb|Doom palette 0, with each color numbered]]
A '''PLAYPAL''' is really a collection of palettes used for various purposes. It has a total of fourteen palettes, each 768 bytes. Each palette has 256 colors of three unsigned bytes each (0-255); one for each of red, green and blue. Furthermore, the [[COLORMAP]] resource also affects the display of colors on screen.
+
The '''PLAYPAL''' [[lump]] is a collection of palettes used by the Doom engine for displaying color fading and tinting effects. Since the engine can only display a maximum of 256 simultaneous colors, in order to achieve these effects, the palettes must be swapped, thus changing the colors displayed on the screen. Each palette in the PLAYPAL lump contains 256 colors totaling 768 bytes, where each color is broken into three unsigned bytes. Each of these color components (red, green, and blue) range between 0 and 255.
   
  +
The [[COLORMAP]] resource also affects the display of colors on screen.
The palettes each have a specific function:
 
  +
{| {{prettytable}}
 
  +
== Doom ==
 
The Doom PLAYPAL contains a total of 14 palettes, where each palette has a specific function:
  +
{| class="WikiaTable"
 
|'''Palette number'''|| '''Use'''
 
|'''Palette number'''|| '''Use'''
 
|-
 
|-
|'''0'''|| Normal
+
|'''0'''|| Normal.
 
|-
 
|-
|'''1'''|| Unused
+
|'''1'''|| Unused.
  +
11% red tint of RGB(252, 2, 3).
 
|-
 
|-
 
|'''2-8'''|| Progressively more red (8 is most red). Used to show pain when the player is hurt, and reddens the screen when the player picks up a [[berserk pack]].
 
|'''2-8'''|| Progressively more red (8 is most red). Used to show pain when the player is hurt, and reddens the screen when the player picks up a [[berserk pack]].
  +
  +
Each of these palettes tints the screen red progressively by 11%, so the highest pain palette makes the screen 88% red, by RGB(255, 0, 0).
 
|-
 
|-
|'''9'''|| Unused
+
|'''9'''|| Unused.
  +
12% yellow tint of RGB(215, 185, 68).
 
|-
 
|-
 
|'''10-12'''|| Progressively more yellow. Used very briefly as the player picks up items.
 
|'''10-12'''|| Progressively more yellow. Used very briefly as the player picks up items.
  +
25%, 37.5%, and 50% of RGB(215, 185, 68).
 
|-
 
|-
|'''13'''||Green tint, used when the [[radiation suit]] is being worn
+
|'''13'''||Green tint, used when the [[radiation suit]] is being worn.
  +
12.5% of RGB(3, 253, 3).
 
|}
 
|}
An 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. Because of the logic used in the palette code, they are never used.
+
An 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.
   
 
Tools which can be used to manipulate the PLAYPAL include [[Inkworks]] and [[DeePsea]].
 
Tools which can be used to manipulate the PLAYPAL include [[Inkworks]] and [[DeePsea]].
Line 26: Line 35:
 
In [[Hexen]], the engine uses an extended PLAYPAL lump containing 28 palettes, of which the additional palettes are used for several new effects.
 
In [[Hexen]], the engine uses an extended PLAYPAL lump containing 28 palettes, of which the additional palettes are used for several new effects.
   
  +
{| class="WikiaTable"
{| {{prettytable}}
 
 
|'''Palette number'''|| '''Use'''
 
|'''Palette number'''|| '''Use'''
 
|-
 
|-
Line 43: Line 52:
 
|'''25-27'''|| Progressively more orange/red. Used briefly when the [[Mage]] fires the [[Bloodscourge]].
 
|'''25-27'''|| Progressively more orange/red. Used briefly when the [[Mage]] fires the [[Bloodscourge]].
 
|}
 
|}
  +
  +
== Index 247 ==
  +
Many specialized editing tools (notably [[NWT]], [[SLumpEd]] and [[XWE]]) rely on the assumption that palette index 247 is not used and can safely be used as a "transparent color", which they display as cyan because it contrasts well with the rest of the Doom palette.
  +
This assumption, however, is incorrect. Palette index 247 ''is'' used by some Doom II graphics, and it is black (0, 0, 0), not cyan. All 256 colors of the palette are shown in the patches and sprites [[picture format]], as a different mechanism for transparency is used. Palette index 247 is used even more in other Doom engine games such as Hexen.
  +
The mistaken assumption created by having these tools treating cyan as a transparent color when importing pictures and converting them to Doom-format graphics, or by giving transparency to pixels indexed 247 when exporting, results in many problems: patches and sprites exported from the [[IWAD]]s might have "holes" that they shouldn't have, and attempts to actually use cyan as a color in graphics (with a palette that does contain this color) are hindered.
   
 
== See also ==
 
== See also ==
Line 51: Line 65:
   
 
== Source ==
 
== Source ==
* This information is from the [[Unofficial Doom Specs]].
+
* This article incorporates information from the [[Unofficial Doom Specs]].
 
[[Category:WAD lumps]]
 
[[Category:WAD lumps]]

Latest revision as of 16:35, 6 August 2019

DoomPalette0

Doom Palette 0

Doompal

Doom palette 0, with each color numbered

The PLAYPAL lump is a collection of palettes used by the Doom engine for displaying color fading and tinting effects. Since the engine can only display a maximum of 256 simultaneous colors, in order to achieve these effects, the palettes must be swapped, thus changing the colors displayed on the screen. Each palette in the PLAYPAL lump contains 256 colors totaling 768 bytes, where each color is broken into three unsigned bytes. Each of these color components (red, green, and blue) range between 0 and 255.

The COLORMAP resource also affects the display of colors on screen.

Doom

The Doom PLAYPAL contains a total of 14 palettes, where each palette has a specific function:

Palette number Use
0 Normal.
1 Unused.

11% red tint of RGB(252, 2, 3).

2-8 Progressively more red (8 is most red). Used to show pain when the player is hurt, and reddens the screen when the player picks up a berserk pack.

Each of these palettes tints the screen red progressively by 11%, so the highest pain palette makes the screen 88% red, by RGB(255, 0, 0).

9 Unused.

12% yellow tint of RGB(215, 185, 68).

10-12 Progressively more yellow. Used very briefly as the player picks up items.

25%, 37.5%, and 50% of RGB(215, 185, 68).

13 Green tint, used when the radiation suit is being worn.

12.5% of RGB(3, 253, 3).

An 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.

Tools which can be used to manipulate the PLAYPAL include Inkworks and DeePsea.

Hexen

In Hexen, the engine uses an extended PLAYPAL lump containing 28 palettes, of which the additional palettes are used for several new effects.

Palette number Use
0 Normal
1-8 Progressively more red. Used to show pain when the player is hurt.
9-12 Progressively more yellow. Used briefly as the player picks up items.
13-20 Progressively more green, used when a player is poisoned or hit with projectiles from the Quietus or Serpent Staff.
21 Light blue tint, used when the player has been frozen.
22-24 Progressively more white. Used briefly when the Cleric fires the Wraithverge.
25-27 Progressively more orange/red. Used briefly when the Mage fires the Bloodscourge.

Index 247

Many specialized editing tools (notably NWT, SLumpEd and XWE) rely on the assumption that palette index 247 is not used and can safely be used as a "transparent color", which they display as cyan because it contrasts well with the rest of the Doom palette. This assumption, however, is incorrect. Palette index 247 is used by some Doom II graphics, and it is black (0, 0, 0), not cyan. All 256 colors of the palette are shown in the patches and sprites picture format, as a different mechanism for transparency is used. Palette index 247 is used even more in other Doom engine games such as Hexen. The mistaken assumption created by having these tools treating cyan as a transparent color when importing pictures and converting them to Doom-format graphics, or by giving transparency to pixels indexed 247 when exporting, results in many problems: patches and sprites exported from the IWADs might have "holes" that they shouldn't have, and attempts to actually use cyan as a color in graphics (with a palette that does contain this color) are hindered.

See also

Source