Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Color Display Attributes
 Monochrome                                Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Each attribute byte in the video buffer corresponds to a specific
     character position on the screen. Bits 4-7 determine the
     character's background color and blink state. Bits 0-3 determine
     the foreground color and brightness.
 
      7        6        5        4           3        2        1        0
 ┌────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┐
 │ Blink  │  Red   │  Green │  Blue  │ │ Bright │  Red   │  Green │  Blue  │
 └────────┴────────┴────────┴────────┘ └────────┴────────┴────────┴────────┘
 
              Background                              Foreground
 
 ──────────────────────────────────────┬────────────────────────────────────
  ── Bits ──    Hex                    │ ── Bits ──    Hex
  7  6  5  4   Value    Color          │ 3  2  1  0   Value    Color
 ──────────────────────────────────────┼────────────────────────────────────
  0  0  0  0     0      Black          │ 0  0  0  0     0      Black
  0  0  0  1     1      Blue           │ 0  0  0  1     1      Blue
  0  0  1  0     2      Green          │ 0  0  1  0     2      Green
  0  0  1  1     3      Cyan           │ 0  0  1  1     3      Cyan
  0  1  0  0     4      Red            │ 0  1  0  0     4      Red
  0  1  0  1     5      Magenta        │ 0  1  0  1     5      Magenta
  0  1  1  0     6      Brown          │ 0  1  1  0     6      Brown
  0  1  1  1     7      White          │ 0  1  1  1     7      White
  1  0  0  0     8      Black blink    │ 1  0  0  0     8      Dark gray
  1  0  0  1     9      Blue blink     │ 1  0  0  1     9      Light blue
  1  0  1  0     A      Green blink    │ 1  0  1  0     A      Light green
  1  0  1  1     B      Cyan blink     │ 1  0  1  1     B      Light cyan
  1  1  0  0     C      Red blink      │ 1  1  0  0     C      Light red
  1  1  0  1     D      Magenta blink  │ 1  1  0  1     D      Light magenta
  1  1  1  0     E      Brown blink    │ 1  1  1  0     E      Yellow
  1  1  1  1     F      White blink    │ 1  1  1  1     F      Bright white
 ──────────────────────────────────────┴────────────────────────────────────
 
  See also: Video Buffers
                                    -♦-