color

set default foreground and background colors for console window 

Command


SYNOPSIS

color [attr]


DESCRIPTION

The color utility sets the default foreground and background colors for the console window to those specified by the color attribute attr. Color attributes are two digit hexadecimal numbers. The first digit indicates the background color; the second digit, the foreground color. Here are the corresponding colors for each hexadecimal digit:

0 Black 8 Gray
1 Blue 9 Light Blue
2 Green A Light Green
3 Aqua B Light Aqua
4 Red C Light Red
5 Purple D Light Purple
6 Yellow E Light Yellow
7 White F Bright White

When you do not specify the attr argument, color restores colors to the default of white on black.

If you attempt to set both the foreground and background to the same color, color considers it an error, changes neither color, and returns with an exit status of 1.


EXAMPLE

The command

color E0

sets the console window defaults to black on light yellow.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

>0 

An error occurred.


PORTABILITY

Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.1 Documentation Build 15.