Skip to content

Instantly share code, notes, and snippets.

@amdelamar
Created August 31, 2017 14:03
Show Gist options
  • Save amdelamar/b24733ff95620c4017ab749cf945f0d8 to your computer and use it in GitHub Desktop.
Save amdelamar/b24733ff95620c4017ab749cf945f0d8 to your computer and use it in GitHub Desktop.
Console Colors
@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
#!/usr/bin/env sh
BLK='\x1B[0;30m' # Black
DGR='\x1B[1;30m' # Dark Gray
RED='\x1B[0;31m' # Red
LR='\x1B[1;31m' # Light Red
GRN='\x1B[0;32m' # Green
LG='\x1B[1;32m' # Light Green
YLW='\x1B[0;33m' # Yellow
LY='\x1B[1;33m' # Light Yellow
BLU='\x1B[0;34m' # Blue
LB='\x1B[1;34m' # Light Blue
PP='\x1B[0;35m' # Purple
LPP='\x1B[1;35m' # Light Purple
CYN='\x1B[0;36m' # Cyan
LC='\x1B[1;36m' # Light Cyan
LGR='\x1B[0;37m' # Light Gray
WHT='\x1B[1;37m' # White
NO='\x1B[0m' # No Color
echo -e "${BLK}Black Color${NO}"
echo -e "${DGR}Dark Gray Color${NO}"
echo -e "${RED}Red Color${NO}"
echo -e "${LR}Light Red Color${NO}"
echo -e "${GRN}Green Color${NO}"
echo -e "${LG}Light Green Color${NO}"
echo -e "${YLW}Yellow Color${NO}"
echo -e "${LY}Light Yellow Color${NO}"
echo -e "${BLU}Blue Color${NO}"
echo -e "${LB}Light Blue Color${NO}"
echo -e "${PP}Purple Color${NO}"
echo -e "${LPP}Light Purple Color${NO}"
echo -e "${CYN}Cyan Color${NO}"
echo -e "${LC}Light Cyan Color${NO}"
echo -e "${LGR}Light Gray Color${NO}"
echo -e "${WHT}White Color${NO}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment