Carmack's typo

Carmack's typo was a minor bug in, a program written by John Carmack in 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. In the utility, Carmack accidentally wrote instead of, meaning that the invulnerability colormap converts all blues to be slightly too bright. 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.