China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-13 14:51
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » How can you change the color of letters under DOS? View 1,826 Replies 7
Original Poster Posted 2006-10-20 10:46 ·  中国 四川 自贡 电信
新手上路
Credits 12
Posts 4
Joined 2006-10-19 10:27
19-year member
UID 66869
Status Offline
As the title says! How to save after setting so that the modified color is used every time DOS is run
Floor 2 Posted 2006-10-20 13:04 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
I don't know whether the owner is talking about changing the letter color of pure DOS or the letter color of the command prompt under Windows.

If it is to change the color of the characters in the command prompt, you can right-click the title bar of the command prompt, then select Properties, then select the Color tab, set the color, click OK, and then click the second "Save properties so that windows with the same title can use them in the future" item.
Floor 3 Posted 2006-10-20 21:53 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Search for the keyword ANSI

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 4 Posted 2006-10-21 09:00 ·  中国 四川 自贡 电信
新手上路
Credits 12
Posts 4
Joined 2006-10-19 10:27
19-year member
UID 66869
Status Offline
Reply to floor 2, what I mean is in the environment of pure DOS or DOS boot disk
Reply to floor 3, thank you, I'm also from Chengdu
Floor 5 Posted 2006-10-21 09:06 ·  中国 内蒙古 赤峰 联通
新手上路
Credits 10
Posts 5
Joined 2006-09-29 23:29
19-year member
UID 64085
Status Offline
Floor 6 Posted 2006-12-04 18:55 ·  中国 湖北 武汉 电信
新手上路
Credits 6
Posts 3
Joined 2006-08-10 14:39
20-year member
UID 60228
Status Offline
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
Floor 7 Posted 2006-12-07 07:55 ·  中国 上海 黄浦区 电信
金牌会员
★★★★
Credits 4,639
Posts 2,239
Joined 2005-01-30 00:00
21-year member
UID 35785
Gender Male
Status Offline
Don't bring Windows stuff here to join in the fun.
Floor 8 Posted 2006-12-24 09:34 ·  中国 河南 洛阳 联通
初级用户
Credits 38
Posts 19
Joined 2006-10-02 03:51
19-year member
UID 64281
Status Offline
It is suggested to use ANSI control codes
Forum Jump: