ANSI
An
The second byte is further broken down into three pieces. Bits 0-3 give the foreground color, 4-6 give the background color, and bit 7 is a flag that tells whether the character should blink. The colors are standard ANSI colors used by DOS. The reason why the foreground has an extra bit is because the higher colors are all bright, and the background is restricted to display darker colors only. So the first eight colors can be used for anything, the last eight colors can be used for the foreground only.
ANSI screens are displayed only for the ENDOOM (or ENDTEXT, or ENDSTRF) screen and the Heretic startup. They cannot be used in-game.
ANSI colors | CP437 characters | |||
---|---|---|---|---|
Background and Foreground | Foreground Only | ![]() | ||
Code | Color | Code | Color | |
0 | Black | 8 | Dark Gray | |
1 | Blue | 9 | Light Blue | |
2 | Green | A | Light Green | |
3 | Cyan | B | Light Cyan | |
4 | Red | C | Light Red | |
5 | Magenta | D | Light Magenta | |
6 | Brown | E | Yellow | |
7 | Light Gray/White | F | Bright White |
This information is from the Unofficial Doom Specs and the DOS "color" command.