COLORMAP
From ZDoom Wiki
COLORMAP contains 34 maps that map colors down in brightness within a palette. Its main purpose is to allow Doom to show sectors with different light levels.
The first 32 maps (0-31) are used for sector brightness. Divide the brightness by 8, rounding down, to get the colormap used. For example, a sector brightness of 7 uses map 0 while a brightness of 8 uses map 1.
Colormap 32 is used when the player has the invulnerability powerup. This colormap disregards sector brightness.
Colormap 33 is left over from the Doom Press release beta and is unused in release versions.
This information is from the Unofficial Doom Specs.

