I know that the color bf
command sets the colors of the whole command line window but I wanted to to print one single line in a different color.
Windows 10 - TH2 and above:
(a.k.a. Version 1511, build 10586, release 2015-11-10)
At Command Prompt:
echo ^[[32m HI ^[[0m
Using the actual keys: echo Ctrl+[[32m HI
Ctrl+[[0m
Enter
You should see a green "HI" below it.
Code numbers can be found here:
Notepad:
To save this into notepad, you can type ESC into it using: Alt+027
with the numpad, then the [32m
part. Another trick when I was on a laptop, redirect the line above into a file to get started, then cut and paste:
echo echo ^[[32m HI ^[[0m >> batch_file.cmd