How to echo with different colors in the Windows command line

前端 未结 23 1226
野性不改
野性不改 2020-11-22 08:55

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.

23条回答
  •  有刺的猬
    2020-11-22 09:34

    To get this working on Windows 10, you can enable this flag: ENABLE_VIRTUAL_TERMINAL_PROCESSING.

    With this registry key you can set this by default

    [HKCU\Console] VirtualTerminalLevel dword 0x1

提交回复
热议问题