Skip to content

Diablo's colors

Anders Jenbo edited this page Apr 8, 2023 · 1 revision

Diablo uses palettes to achieve several effects such as lighting, animated liquids and monster variations. For this to work there are several restrictions applied to how the colors are laid out in the palette.

The very first color is black and is used for shadows. The next 127 colors are dedicated to the current level. The last 128 colors are left for everything else and will remain the same on every level. This allows the game to have several color variations for the levels while still having monsters, players and the UI to stay the same consistent colors.

Additionally the colors are arranged in to 18 gradients. This allows the game to quickly apply lighting to a pixel by simply shifting down the gradient. This does limit the game to to very few color variation but avoids most of the color noise that can happen with other techniques where lighting is approximated across all 256 colors.

Clone this wiki locally