Color


Applies To: Windows Server 2008,Windows Vista

Changes the foreground and background colors in the Command Prompt window for the current session. If used without parameters, color restores the default Command Prompt window foreground and background colors.

For examples of how to use this command, see Examples.

Syntax


Copy Code

color [[<B>]<F>]

Parameters

Parameter

Description

<B>

Specifies the background color.

<F>

Specifies the foreground color.

/?

Displays help at the command prompt.

Remarks

Value

Color

0

Black

1

Blue

2

Green

3

Aqua

4

Red

5

Purple

6

Yellow

7

White

8

Gray

9

Light blue

A

Light green

B

Light aqua

C

Light red

D

Light purple

E

Light yellow

F

Bright white

Examples

To change the Command Prompt window background color to gray and the foreground color to red, type:


Copy Code

color 84

To change the Command Prompt window foreground color to light yellow, type:


Copy Code

color e

Note

In this example, the background is set to the default color because only one hexadecimal digit is specified.

Additional references

Command-Line Syntax Key