Microsoft KB Archive/35141

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Text Colors with printf ID Number: Q35141

5.x MS-DOS

Summary:

Under the following EGA and text screen modes, printf has a foreground of color 7 (gray by default) and a background of color 0 (black by default):

_TEXTBW40 _TEXTC40 _TEXTBW80 _TEXTC80 _TEXTMONO _MRES16COLOR _HRES16COLOR _ERESCOLOR _VRES16COLOR _MRES256COLOR

The color of color 0 and color 7 can be changed through the use of ANSI.SYS escape codes in text mode, or by using the _remapalette function in graphics mode.