Color in BATCH
Antoine
-
phinn3 -
phinn3 -
Hello,
Is it possible to change the color of a word in BATCH?
I know how to change the background and all the text.
Can you help me please?
Thank you
Configuration: Windows XP / Firefox 3.6.3
Is it possible to change the color of a word in BATCH?
I know how to change the background and all the text.
Can you help me please?
Thank you
Configuration: Windows XP / Firefox 3.6.3
5 answers
-
Use color xx
Where x is a hexadecimal number
Citation: Command prompt
0 = Black 8 = Gray 1 = Dark Blue 9 = Light Blue 2 = Green A = Light Green 3 = Blue-Gray B = Cyan 4 = Brown C = Red 5 = Purple D = Pink 6 = Olive E = Yellow 7 = Light Gray F = White
-
Re,
better, we type:
COLOR /? which results in:
Changes the default colors of the console's foreground and background.
COLOR [attr]
attr Specifies the color attributes for the console appearance
Color attributes are specified by TWO hexadecimal digits -- the
first corresponds to the background, the second to the foreground. Each digit
can take any of these values:
0 = Black 8 = Gray
1 = Dark Blue 9 = Light Blue
2 = Green A = Light Green
3 = Blue-Gray B = Cyan
4 = Brown C = Red
5 = Purple D = Pink
6 = Olive E = Yellow
7 = Light Gray F = White
If no argument is given, this command restores the colors
selected when CMD.EXE was opened. This value comes either from the
console window, the command line switch /T, or the
DefaultColor value from the registry.
The COLOR command sets ERRORLEVEL to 1 if you attempt to execute it
with the same color for both background and foreground.
Example: "COLOR fc" displays red on white
-
-
I'm sorry for you for not knowing how to use Google, you can find absolutely everything even the unimaginable.
I already did several searches before posting.
I asked on CCM because I have already seen colors in batch. -
Hello
it's impossible to color the text only under the MS-DOS system, but it's possible under Linux or Windows (GUI, API)
karirovax ;) -
-
It's a shame that people don't take the time to search before posting.
I searched on Google and one second later I had the answer.
http://www.infos-du-net.com/forum/268614-21-texte-couleur-batch
I'm sorry for you for not knowing how to use Google; you can find absolutely everything, even the unimaginable.-
-
-
Hello
If Google told everything, we wouldn't have so many questions a day.... <= if people searched a little more (some aren't even capable of typing 2 words into Google and clicking on the first suggested link), we might have a few less questions.
I don't mean to say that Antoine didn't search, my remark is more general. -
-
-