Advertisement
T3RRYT3RR0R

Batch VT color code Cheatsheet

Sep 20th, 2020 (edited)
666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.10 KB | None | 0 0
  1. @Echo Off& Setlocal DisableDelayedExpansion
  2.  Set "DEF/List+Array=Set "#$V=0"&Set "$$V="&For %%n in (1 2)Do if %%n==2 (For %%G in (!$V!)Do (Set "%%~G" > Nul & (For /F "Tokens=1 Delims==" %%i in ("%%~G")Do Set "$V[!#$V!]=%%i") &Set /A "#$V+=1"))Else Set $V="
  3.  Set "Tab=  "
  4.  Echo/Define VT contol Character&Echo/For /F %%%%E in ('echo prompt $E ^^^| cmd')do (Set "/E=%%%%E")
  5.  For /F %%E in ('echo prompt $E ^| cmd')do ((Set "/E=%%E[0m%%E[!C!m%%E[K%%/E%%[!C!m!TAB!C")&Set "/Ergb=%%E[0m%%E[38;2;$Vm%%E[K")
  6.  Setlocal EnableExtensions EnableDelayedExpansion
  7.  %DEF/List+Array:$V=Color%"Red=31" "Yellow=33" "Green=32" "Blue=34" "Purple=35" "Cyan=36" "White=37" "Gray=90" "Pink=91" "Beige=93" "Aqua=94" "Magenta=95" "Teal=96" "Off=0" "Black=30" "iBlack=7;30" "iRed=7;31" "iYellow=7;33" "iGreen=7;32" "iBlue=7;34" "iPurple=7;35" "iCyan=7;36" "iWhite=7;37" "iGray=7;90" "iPink=7;91" "iBeige=7;93" "iAqua=7;94" "iMagenta=7;95" "iTeal=7;96"
  8.  For /L %%i in (0,1,!#Color!)Do For %%C in (!Color[%%i]!)Do For %%G in ("!/E:C=%%~C!")Do Echo/%%~G
  9. Echo/%!!%[E]xit
  10. Choice /N /C E /T 10 /D E
  11. Endlocal&Endlocal&Goto :Eof
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement