@echo off setlocal EnableDelayedExpansion :init set var1=7 set var2=0 set var3=0 color 07 :foreground cls set var3=0 echo set the TEXT color echo. echo 0 = black 4 = red echo 1 = blue 5 = purple echo 2 = green 6 = yellow echo 3 = aqua 7 = White echo. echo 8 = start 9 = next echo. echo. choice /c:0123456789 /n /m "Action? " if ERRORLEVEL==10 ( goto background ) if ERRORLEVEL==9 ( goto foreground ) if ERRORLEVEL==8 ( set var1=7 if !var1! EQU !var2! ( echo can't have the same color for text and background! echo. pause goto foreground ) color !var2!!var1! goto colortest ) if ERRORLEVEL==7 ( set var1=6 if !var1! EQU !var2! ( echo can't have the same color for text and background! echo. pause goto foreground ) color !var2!!var1! goto colortest ) if ERRORLEVEL==6 ( set var1=5 if !var1! EQU !var2! ( echo can't have the same color for text and background! echo. pause goto foreground ) color !var2!!var1! goto colortest ) if ERRORLEVEL==5 ( set var1=C if !var1! EQU !var2! ( echo can't have the same color for text and background! echo. pause goto foreground ) color !var2!!var1! goto colortest ) if ERRORLEVEL==4 ( set var1=3 if !var1! EQU !var2! ( echo can't have the same color for text and background! echo. pause goto foreground ) color !var2!!var1! goto colortest ) if ERRORLEVEL==3 ( set var1=A if !var1! EQU !var2! ( echo can't have the same color for text and background! echo. pause goto foreground ) color !var2!!var1! goto colortest ) if ERRORLEVEL==2 ( set var1=9 if !var1! EQU !var2! ( echo can't have the same color for text and background! echo. pause goto foreground ) color !var2!!var1! goto colortest ) if ERRORLEVEL==1 ( set var1=0 if !var1! EQU !var2! ( echo can't have the same color for text and background! echo. pause goto foreground ) color !var2!!var1! goto colortest ) :background cls set var3=1 echo set the BACKGROUND color echo. echo 0 = black 4 = red echo 1 = blue 5 = purple echo 2 = green 6 = yellow echo 3 = aqua 7 = White echo. echo 8 = start 9 = back echo. echo. choice /c:0123456789 /n /m "Action? " if ERRORLEVEL==10 ( goto foreground ) if ERRORLEVEL==9 ( goto foreground ) if ERRORLEVEL==8 ( set var2=7 if !var2! EQU !var1! ( echo can't have the same color for text and background! echo. pause goto background ) color !var2!!var1! goto colortest ) if ERRORLEVEL==7 ( set var2=6 if !var2! EQU !var1! ( echo can't have the same color for text and background! echo. pause goto background ) color !var2!!var1! goto colortest ) if ERRORLEVEL==6 ( set var2=5 if !var2! EQU !var1! ( echo can't have the same color for text and background! echo. pause goto background ) color !var2!!var1! goto colortest ) if ERRORLEVEL==5 ( set var2=C if !var2! EQU !var1! ( echo can't have the same color for text and background! echo. pause goto background ) color !var2!!var1! goto colortest ) if ERRORLEVEL==4 ( set var2=3 if !var2! EQU !var1! ( echo can't have the same color for text and background! echo. pause goto background ) color !var2!!var1! goto colortest ) if ERRORLEVEL==3 ( set var2=A if !var2! EQU !var1! ( echo can't have the same color for text and background! echo. pause goto background ) color !var2!!var1! goto colortest ) if ERRORLEVEL==2 ( set var2=9 if !var2! EQU !var1! ( echo can't have the same color for text and background! echo. pause goto background ) color !var2!!var1! goto colortest ) if ERRORLEVEL==1 ( set var2=0 if !var2! EQU !var1! ( echo can't have the same color for text and background! echo. pause goto background ) color !var2!!var1! goto colortest ) :colortest cls echo is this the color you want? echo. echo 1 = Yes 2 = No echo. choice /c:12 /n /m "Action? " if ERRORLEVEL==2 ( color 07 goto foreground ) if ERRORLEVEL==1 ( goto foreground )