Carmack's typo


Carmack's typo was a minor bug in dcolors.c, a program written by John Carmack in 1992 during early development of Doom. To generate the invulnerability colormap, Carmack converted each color in the palette to a gray scale value using a standard formula, where the gray scale value equals red*0.299 + green*0.587 + blue*0.114. In the utility, Carmack accidentally wrote 0.144 instead of 0.114, meaning that the invulnerability colormap converts all blues to be slightly too dark.[1] Since the invulnerability colormap inverts the gray scale palette, this means the gray scale colors converted from blue are calculated as brighter than they should be, and so become darker than they should be when the palette is inverted.


  1. Stine, Andrew. "dmutils GitHub repository." GitHub.