Skip to content

Instantly share code, notes, and snippets.

@RDCH106
Forked from mlocati/win10colors.cmd
Created October 4, 2016 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RDCH106/d4d91c42f710796e1e90a02e8a2648b3 to your computer and use it in GitHub Desktop.
Save RDCH106/d4d91c42f710796e1e90a02e8a2648b3 to your computer and use it in GitHub Desktop.
ANSI Colors in standard Windows 10 shell
@echo off
cls
echo  STYLES 
echo ^<ESC^>[0m Reset
echo ^<ESC^>[1m Bold
echo ^<ESC^>[4m Underline
echo ^<ESC^>[7m Inverse
echo.
echo  NORMAL FOREGROUND COLORS 
echo ^<ESC^>[30m Black (black)
echo ^<ESC^>[31m Red
echo ^<ESC^>[32m Green
echo ^<ESC^>[33m Yellow
echo ^<ESC^>[34m Blue
echo ^<ESC^>[35m Magenta
echo ^<ESC^>[36m Cyan
echo ^<ESC^>[37m White
echo.
echo  NORMAL BACKGROUND COLORS 
echo ^<ESC^>[40m Black
echo ^<ESC^>[41m Red
echo ^<ESC^>[42m Green
echo ^<ESC^>[43m Yellow
echo ^<ESC^>[44m Blue
echo ^<ESC^>[45m Magenta
echo ^<ESC^>[46m Cyan
echo ^<ESC^>[47m White (white)
echo.
echo  STRONG FOREGROUND COLORS 
echo ^<ESC^>[90m White
echo ^<ESC^>[91m Red
echo ^<ESC^>[92m Green
echo ^<ESC^>[93m Yellow
echo ^<ESC^>[94m Blue
echo ^<ESC^>[95m Magenta
echo ^<ESC^>[96m Cyan
echo ^<ESC^>[97m White
echo.
echo  STRONG BACKGROUND COLORS 
echo ^<ESC^>[100m Black
echo ^<ESC^>[101m Red
echo ^<ESC^>[102m Green
echo ^<ESC^>[103m Yellow
echo ^<ESC^>[104m Blue
echo ^<ESC^>[105m Magenta
echo ^<ESC^>[106m Cyan
echo ^<ESC^>[107m White
echo.
echo  COMBINATIONS 
echo ^<ESC^>[31m red foreground color
echo ^<ESC^>[7m inverse foreground ^<-^> background
echo ^<ESC^>[7;31m inverse red foreground color
echo ^<ESC^>[7m and nested ^<ESC^>[31m before nested
echo ^<ESC^>[31m and nested ^<ESC^>[7m before nested
@RDCH106
Copy link
Author

RDCH106 commented Oct 4, 2016

Output:

output

PS: Download the raw file: it contains the escape character (hex 1B, dec 27, oct 33).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment