WINDOWS 里面的:
color
设置默认的控制台前景和背景颜色。
COLOR
attr 指定控制台输出的颜色属性
颜色属性由两个十六进制数字指定 -- 第一个为背景,第二个则为
前景。每个数字可以为以下任何值之一:
0 = 黑色 8 = 灰色
1 = 蓝色 9 = 淡蓝色
2 = 绿色 A = 淡绿色
3 = 湖蓝色 B = 淡浅绿色
4 = 红色 C = 淡红色
5 = 紫色 D = 淡紫色
6 = 黄色 E = 淡黄色
7 = 白色 F = 亮白色
如果没有给定任何参数,该命令会将颜色还原到 CMD.EXE 启动时
的颜色。这个值来自当前控制台窗口、/T 开关或
DefaultColor 注册表值。
如果用相同的前景和背景颜色来执行 COLOR 命令,COLOR 命令
会将 ERRORLEVEL 设置为 1。
例如: "COLOR fc" 在亮白色上产生亮红色
DOS的:
http://www.cn-dos.net/forum/viewthread.php?tid=1272&fpage=1&highlight=ANSI
In WINDOWS:
color
Sets the default foreground and background colors of the console.
COLOR
attr Specifies the color attributes of console output
The color attribute is specified by two hexadecimal digits -- the first
is the background, the second is the foreground. Each digit can be one of the following values:
0 = black 8 = gray
1 = blue 9 = light blue
2 = green A = light green
3 = turquoise B = light turquoise
4 = red C = light red
5 = purple D = light purple
6 = yellow E = light yellow
7 = white F = bright white
If no parameters are given, the command restores the color to what it was when CMD.EXE started. This value comes from the current console window, the /T switch, or the DefaultColor registry value.
If the COLOR command is executed with the same foreground and background colors, the COLOR command sets ERRORLEVEL to 1.
For example: "COLOR fc" produces bright red on bright white
For DOS:
http://www.cn-dos.net/forum/viewthread.php?tid=1272&fpage=1&highlight=ANSI