#1 31 Jul 2020 14:17

HiraetH_MARVEL
New Member
Registered: 31 Jul 2020
Posts: 1

How to make cmd look better??

I want to change my cmd's text color.
who has some good recommendation about this?
thanks!!!!!!! smile
this is a photo

Offline

#2 01 Aug 2020 22:20

Shadow Thief
Member
Registered: 12 Jul 2012
Posts: 191

Re: How to make cmd look better??

It's going to come down to personal preference, really. I usually stick to the default 07, although a lot of people seem to like 02 or 0A.

Offline

#3 03 Aug 2020 11:48

Tei_tsubaki
Member
Registered: 28 Jul 2020
Posts: 7

Re: How to make cmd look better??

I think default color is the best.
But change color just for identification.

Offline

#4 08 Aug 2020 10:39

Minecraft49
Member
From: Poland
Registered: 08 Aug 2020
Posts: 9
Website

Re: How to make cmd look better??

Tip: if you want brighter text than standard, use color 0fsmile

Offline

#5 20 Aug 2020 17:10

Simon_Weel
Member
Registered: 17 Aug 2020
Posts: 3

Re: How to make cmd look better??

ANSI Escape Codes. In the days of DOS, you had to load ansi.sys in order to use those codes. In CMD, they are embedded. So a line like

echo [[41m[2J [1mThis[0;41m is a test

changes the background color to light red, the first word in bold and the rest as white.

Offline

#6 21 Aug 2020 11:16

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 1,079
Website

Re: How to make cmd look better??

ANSI escapes don't work in any current version of Windows.

Offline

#7 21 Aug 2020 15:10

Shadow Thief
Member
Registered: 12 Jul 2012
Posts: 191

Re: How to make cmd look better??

Simon Sheppard wrote:

ANSI escapes don't work in any current version of Windows.

Windows 10 added support for VT100 sequences

Offline

#8 21 Aug 2020 19:21

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 1,079
Website

Re: How to make cmd look better??

Shadow Thief wrote:
Simon Sheppard wrote:

ANSI escapes don't work in any current version of Windows.

Windows 10 added support for VT100 sequences

How did I miss that being added!

Still from a quick Google it looks like it is disabled by default and has to be enabled with a registry key (REG ADD HKCU\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1)
I'd much prefer something that can be toggled on, on a per-script basis so that the script is portable between machines.

Edit: On looking into this some more, it is now enabled by default, so I have added a page for it here:
https://ss64.com/nt/syntax-ansi.html

Everything old is new again!

Last edited by Simon Sheppard (25 Aug 2020 16:47)

Offline

Board footer

Powered by FluxBB