Select Your Colors

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
th3w1zard1
Posts: 8
Joined: 29 May 2011 08:34

Select Your Colors

#1 Post by th3w1zard1 » 29 May 2011 08:41

This is kind of long, and boring, but i made a batch file that will:
1.) Let you choose your text color
2.) Let you choose your background color
This code is very long, so make sure you copy the whole thing. This was meant so you can put this into your own batch file. So here it is:

Code: Select all

:setstuff
@echo off
REM Type the first jump of your code here:
set start= %flee

:color
@echo off
echo ****************************************************
echo *       Select the text color of the program       *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Green             *
echo * (3) Aqua             (b) Light Aqua              *
echo * (4) Red              (c) Light Red               *
echo * (5) Purple           (d) Light Purple            *
echo * (6) Yellow           (e) Light Yellow            *
echo * (7) White            (f) Bright White            *
echo *                                                  *
echo *       (g) Just use the default colors            *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto black
if %choice%==1 goto blue
if %choice%==2 goto green
if %choice%==3 goto aqua
if %choice%==4 goto red
if %choice%==5 goto purple
if %choice%==6 goto yellow
if %choice%==7 goto white
if %choice%==8 goto gray
if %choice%==9 goto lightblue
if %choice%==a goto lightgreen
if %choice%==b goto lightaqua
if %choice%==c goto lightred
if %choice%==d goto lightpurple
if %choice%==e goto lightyellow
if %choice%==f goto brightwhite
if %choice%==g goto default
goto color

:default
color 0a
goto %start%

REM ********************************************************************************
REM                           BACKGROUND COLORS                                     
REM ********************************************************************************

:black
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Blue             (8) Light Blue              *
echo * (1) Green            (9) Light Green             *
echo * (2) Aqua             (a) Light Aqua              *
echo * (3) Red              (b) Light Red               *
echo * (4) Purple           (c) Light Purple            *
echo * (5) Yellow           (d) Light Yellow            *
echo * (6) White            (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto blackblue
if %choice%==1 goto blackgreen
if %choice%==2 goto blackaqua
if %choice%==3 goto blackred
if %choice%==4 goto blackpurple
if %choice%==5 goto blackyellow
if %choice%==6 goto blackwhite
if %choice%==7 goto blackgray
if %choice%==8 goto blacklightblue
if %choice%==9 goto blacklightgreen
if %choice%==a goto blacklightaqua
if %choice%==b goto blacklightred
if %choice%==c goto blacklightpurple
if %choice%==d goto blacklightyellow
if %choice%==e goto blackbrightwhite
goto black

:blackblue
color 10
goto %start%

:blackgreen
color 20
goto %start%

:blackaqua
color 30
goto %start%

:blackred
color 40
goto %start%

:blackpurple
color 50
goto %start%

:blackyellow
color 60
goto %start%

:blackwhite
color 70
goto %start%

:blackgray
color 80
goto %start%

:blacklightblue
color 90
goto %start%

:blacklightgreen
color a0
goto %start%

:blacklightaqua
color b0
goto %start%

:blacklightred
color c0
goto %start%

:blacklightpurple
color d0
goto %start%

:blacklightyellow
color e0
goto %start%

:blackbrightwhite
color f0
goto %start%

:blue
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Light Blue              *
echo * (1) Green            (9) Light Green             *
echo * (2) Aqua             (a) Light Aqua              *
echo * (3) Red              (b) Light Red               *
echo * (4) Purple           (c) Light Purple            *
echo * (5) Yellow           (d) Light Yellow            *
echo * (6) White            (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto blueblack
if %choice%==1 goto bluegreen
if %choice%==2 goto blueaqua
if %choice%==3 goto bluered
if %choice%==4 goto bluepurple
if %choice%==5 goto blueyellow
if %choice%==6 goto bluewhite
if %choice%==7 goto bluegray
if %choice%==8 goto bluelightblue
if %choice%==9 goto bluelightgreen
if %choice%==a goto bluelightaqua
if %choice%==b goto bluelightred
if %choice%==c goto bluelightpurple
if %choice%==d goto bluelightyellow
if %choice%==e goto bluebrightwhite
goto blue

:blueblack
color 01
goto %start%

:bluegreen
color 21
goto %start%

:blueaqua
color 31
goto %start%

:bluered
color 41
goto %start%

:bluepurple
color 51
goto %start%

:blueyellow
color 61
goto %start%

:bluewhite
color 71
goto %start%

:bluegray
color 81
goto %start%

:bluelightblue
color 91
goto %start%

:bluelightgreen
color a1
goto %start%

:bluelightaqua
color b1
goto %start%

:bluelightred
color c1
goto %start%

:bluelightpurple
color d1
goto %start%

:bluelightyellow
color e1
goto %start%

:bluebrightwhite
color f1
goto %start%

:green
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Light Blue              *
echo * (1) Blue             (9) Light Green             *
echo * (2) Aqua             (a) Light Aqua              *
echo * (3) Red              (b) Light Red               *
echo * (4) Purple           (c) Light Purple            *
echo * (5) Yellow           (d) Light Yellow            *
echo * (6) White            (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto greenblack
if %choice%==1 goto greenblue
if %choice%==2 goto greenaqua
if %choice%==3 goto greenred
if %choice%==4 goto greenpurple
if %choice%==5 goto greenyellow
if %choice%==6 goto greenwhite
if %choice%==7 goto greengray
if %choice%==8 goto greenlightblue
if %choice%==9 goto greenlightgreen
if %choice%==a goto greenlightaqua
if %choice%==b goto greenlightred
if %choice%==c goto greenlightpurple
if %choice%==d goto greenlightyellow
if %choice%==e goto greenbrightwhite
goto green

:greenblack
color 02
goto %start%

:greenblue
color 12
goto %start%

:greenaqua
color 32
goto %start%

:greenred
color 42
goto %start%

:greenpurple
color 52
goto %start%

:greenyellow
color 62
goto %start%

:greenwhite
color 72
goto %start%

:greengray
color 82
goto %start%

:greenlightblue
color 92
goto %start%

:greenlightgreen
color a2
goto %start%

:greenlightaqua
color b2
goto %start%

:greenlightred
color c2
goto %start%

:greenlightpurple
color d2
goto %start%

:greenlightyellow
color e2
goto %start%

:greenbrightwhite
color f2
goto %start%

:aqua
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Light Blue              *
echo * (1) Blue             (9) Light Green             *
echo * (2) Green            (a) Light Aqua              *
echo * (3) Red              (b) Light Red               *
echo * (4) Purple           (c) Light Purple            *
echo * (5) Yellow           (d) Light Yellow            *
echo * (6) White            (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto aquablack
if %choice%==1 goto aquablue
if %choice%==2 goto aquagreen
if %choice%==3 goto aquared
if %choice%==4 goto aquapurple
if %choice%==5 goto aquayellow
if %choice%==6 goto aquawhite
if %choice%==7 goto aquagray
if %choice%==8 goto aqualightblue
if %choice%==9 goto aqualightgreen
if %choice%==a goto aqualightaqua
if %choice%==b goto aqualightred
if %choice%==c goto aqualightpurple
if %choice%==d goto aqualightyellow
if %choice%==e goto aquabrightwhite
goto aqua

:aquablack
color 03
goto %start%

:aquablue
color 13
goto %start%

:aquagreen
color 23
goto %start%

:aquared
color 43
goto %start%

:aquapurple
color 53
goto %start%

:aquayellow
color 63
goto %start%

:aquawhite
color 73
goto %start%

:aquagray
color 83
goto %start%

:aqualightblue
color 93
goto %start%

:aqualightgreen
color a3
goto %start%

:aqualightaqua
color b3
goto %start%

:aqualightred
color c3
goto %start%

:aqualightpurple
color d3
goto %start%

:aqualightyellow
color e3
goto %start%

:aquabrightwhite
color f3
goto %start%

:red
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Light Blue              *
echo * (1) Blue             (9) Light Green             *
echo * (2) Green            (a) Light Aqua              *
echo * (3) Aqua             (b) Light Red               *
echo * (4) Purple           (c) Light Purple            *
echo * (5) Yellow           (d) Light Yellow            *
echo * (6) White            (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto redblack
if %choice%==1 goto redblue
if %choice%==2 goto redgreen
if %choice%==3 goto redaqua
if %choice%==4 goto redpurple
if %choice%==5 goto redyellow
if %choice%==6 goto redwhite
if %choice%==7 goto redgray
if %choice%==8 goto redlightblue
if %choice%==9 goto redlightgreen
if %choice%==a goto redlightaqua
if %choice%==b goto redlightred
if %choice%==c goto redlightpurple
if %choice%==d goto redlightyellow
if %choice%==e goto redbrightwhite
goto red

:redblack
color 04
goto %start%

:redblue
color 14
goto %start%

:redgreen
color 24
goto %start%

:redaqua
color 34
goto %start%

:redpurple
color 54
goto %start%

:redyellow
color 64
goto %start%

:redwhite
color 74
goto %start%

:redgray
color 84
goto %start%

:redlightblue
color 94
goto %start%

:redlightgreen
color a4
goto %start%

:redlightaqua
color b4
goto %start%

:redlightred
color c4
goto %start%

:redlightpurple
color d4
goto %start%

:redlightyellow
color e4
goto %start%

:redbrightwhite
color f4
goto %start%

:purple
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Light Blue              *
echo * (1) Blue             (9) Light Green             *
echo * (2) Green            (a) Light Aqua              *
echo * (3) Aqua             (b) Light Red               *
echo * (4) Red              (c) Light Purple            *
echo * (5) Yellow           (d) Light Yellow            *
echo * (6) White            (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto purpleblack
if %choice%==1 goto purpleblue
if %choice%==2 goto purplegreen
if %choice%==3 goto purpleaqua
if %choice%==4 goto purplered
if %choice%==5 goto purpleyellow
if %choice%==6 goto purplewhite
if %choice%==7 goto purplegray
if %choice%==8 goto purplelightblue
if %choice%==9 goto purplelightgreen
if %choice%==a goto purplelightaqua
if %choice%==b goto purplelightred
if %choice%==c goto purplelightpurple
if %choice%==d goto purplelightyellow
if %choice%==e goto purplebrightwhite
goto purple

:purpleblack
color 05
goto %start%

:purpleblue
color 15
goto %start
:purplegreen
color 25
goto %start%

:purpleaqua
color 35
goto %start%

:purplered
color 45
goto %start%

:purpleyellow
color 65
goto %start%

:purplewhite
color 75
goto %start%

:purplegray
color 85
goto %start%

:purplelightblue
color 95
goto %start%

:purplelightgreen
color a5
goto %start%

:purplelightaqua
color b5
goto %start%

:purplelightred
color c5
goto %start%

:purplelightpurple
color d5
goto %start%

:purplelightyellow
color e5
goto %start%

:purplebrightwhite
color f5
goto %start%

cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Light Blue              *
echo * (1) Blue             (9) Light Green             *
echo * (2) Green            (a) Light Aqua              *
echo * (3) Aqua             (b) Light Red               *
echo * (4) Red              (c) Light Purple            *
echo * (5) Purple           (d) Light Yellow            *
echo * (6) White            (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto yellowblack
if %choice%==1 goto yellowblue
if %choice%==2 goto yellowgreen
if %choice%==3 goto yellowaqua
if %choice%==4 goto yellowred
if %choice%==5 goto yellowpurple
if %choice%==6 goto yellowwhite
if %choice%==7 goto yellowgray
if %choice%==8 goto yellowlightblue
if %choice%==9 goto yellowlightgreen
if %choice%==a goto yellowlightaqua
if %choice%==b goto yellowlightred
if %choice%==c goto yellowlightpurple
if %choice%==d goto yellowlightyellow
if %choice%==e goto yellowbrightwhite
goto yellow

:yellowblack
color 06
goto %start%

:yellowblue
color 16
goto %start%

:yellowgreen
color 26
goto %start%

:yellowaqua
color 36
goto %start%

:yellowred
color 46
goto %start%

:yellowpurple
color 56
goto %start%

:yellowwhite
color 76
goto %start%

:yellowgray
color 86
goto %start%

:yellowlightblue
color 96
goto %start%

:yellowlightgreen
color a6
goto %start%

:yellowlightaqua
color b6
goto %start%

:yellowlightred
color c6
goto %start%

:yellowlightpurple
color d6
goto %start%

:yellowlightyellow
color e6
goto %start%

:yellowbrightwhite
color f6
goto %start%

:white
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Light Blue              *
echo * (1) Blue             (9) Light Green             *
echo * (2) Green            (a) Light Aqua              *
echo * (3) Aqua             (b) Light Red               *
echo * (4) Red              (c) Light Purple            *
echo * (5) Purple           (d) Light Yellow            *
echo * (6) Yellow           (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto whiteblack
if %choice%==1 goto whiteblue
if %choice%==2 goto whitegreen
if %choice%==3 goto whiteaqua
if %choice%==4 goto whitered
if %choice%==5 goto whitepurple
if %choice%==6 goto whiteyellow
if %choice%==7 goto whitegray
if %choice%==8 goto whitelightblue
if %choice%==9 goto whitelightgreen
if %choice%==a goto whitelightaqua
if %choice%==b goto whitelightred
if %choice%==c goto whitelightpurple
if %choice%==d goto whitelightyellow
if %choice%==e goto whitebrightwhite
goto white

:whiteblack
color 07
goto %start%

:whiteblue
color 17
goto %start%

:whitegreen
color 27
goto %start%

:whiteaqua
color 37
goto %start%

:whitered
color 47
goto %start%

:whitepurple
color 57
goto %start%

:whiteyellow
color 67
goto %start%

:whitegray
color 87
goto %start%

:whitelightblue
color 97
goto %start%

:whitelightgreen
color a7
goto %start%

:whitelightaqua
color b7
goto %start%

:whitelightred
color c7
goto %start%

:whitelightpurple
color d7
goto %start%

:whitelightyellow
color e7
goto %start%

:whitebrightwhite
color f7
goto %start%

:gray
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Light Blue              *
echo * (1) Blue             (9) Light Green             *
echo * (2) Green            (a) Light Aqua              *
echo * (3) Aqua             (b) Light Red               *
echo * (4) Red              (c) Light Purple            *
echo * (5) Purple           (d) Light Yellow            *
echo * (6) Yellow           (e) Bright White            *
echo * (7) White                                        *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto grayblack
if %choice%==1 goto grayblue
if %choice%==2 goto graygreen
if %choice%==3 goto grayaqua
if %choice%==4 goto grayred
if %choice%==5 goto graypurple
if %choice%==6 goto grayyellow
if %choice%==7 goto graywhite
if %choice%==8 goto graylightblue
if %choice%==9 goto graylightgreen
if %choice%==a goto graylightaqua
if %choice%==b goto graylightred
if %choice%==c goto graylightpurple
if %choice%==d goto graylightyellow
if %choice%==e goto graybrightwhite
goto gray

:grayblack
color 08
goto %start%

:grayblue
color 18
goto %start%

:graygreen
color 28
goto %start%

:grayaqua
color 38
goto %start%

:grayred
color 48
goto %start%

:graypurple
color 58
goto %start%

:grayyellow
color 68
goto %start%

:graywhite
color 78
goto %start%

:graylightblue
color 98
goto %start%

:graylightgreen
color a8
goto %start%

:graylightaqua
color b8
goto %start%

:graylightred
color c8
goto %start%

:graylightpurple
color d8
goto %start%

:graylightyellow
color e8
goto %start%

:graybrightwhite
color f8
goto %start%

:lightblue
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Green             *
echo * (2) Green            (a) Light Aqua              *
echo * (3) Aqua             (b) Light Red               *
echo * (4) Red              (c) Light Purple            *
echo * (5) Purple           (d) Light Yellow            *
echo * (6) Yellow           (e) Bright White            *
echo * (7) White                                        *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto lightblueblack
if %choice%==1 goto lightblueblue
if %choice%==2 goto lightbluegreen
if %choice%==3 goto lightblueaqua
if %choice%==4 goto lightbluered
if %choice%==5 goto lightbluepurple
if %choice%==6 goto lightblueyellow
if %choice%==7 goto lightbluewhite
if %choice%==8 goto lightbluegray
if %choice%==9 goto lightbluelightgreen
if %choice%==a goto lightbluelightaqua
if %choice%==b goto lightbluelightred
if %choice%==c goto lightbluelightpurple
if %choice%==d goto lightbluelightyellow
if %choice%==e goto lightbluebrightwhite
goto lightblue

:lightblueblack
color 09
goto %start%

:lightblueblue
color 19
goto %start%

:lightbluegreen
color 29
goto %start%

:lightblueaqua
color 39
goto %start%

:lightbluered
color 49
goto %start%

:lightbluepurple
color 59
goto %start%

:lightblueyellow
color 69
goto %start%

:lightbluewhite
color 79
goto %start%

:lightbluegray
color 89
goto %start%

:lightbluelightgreen
color a9
goto %start%

:lightbluelightaqua
color b9
goto %start%

:lightbluelightred
color c9
goto %start%

:lightbluelightpurple
color d9
goto %start%

:lightbluelightyellow
color e9
goto %start%

:lightbluebrightwhite
color f9
goto %start%

:lightgreen
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Aqua              *
echo * (3) Aqua             (b) Light Red               *
echo * (4) Red              (c) Light Purple            *
echo * (5) Purple           (d) Light Yellow            *
echo * (6) Yellow           (e) Bright White            *
echo * (7) White                                        *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto lightgreenblack
if %choice%==1 goto lightgreenblue
if %choice%==2 goto lightgreengreen
if %choice%==3 goto lightgreenaqua
if %choice%==4 goto lightgreenred
if %choice%==5 goto lightgreenpurple
if %choice%==6 goto lightgreenyellow
if %choice%==7 goto lightgreenwhite
if %choice%==8 goto lightgreengray
if %choice%==9 goto lightgreenlightblue
if %choice%==a goto lightgreenlightaqua
if %choice%==b goto lightgreenlightred
if %choice%==c goto lightgreenlightpurple
if %choice%==d goto lightgreenlightyellow
if %choice%==e goto lightgreenbrightwhite
goto lightgreen

:lightgreenblack
color 0a
goto %start%

:lightgreenblue
color 1a
goto %start%

:lightgreengreen
color 2a
goto %start%

:lightgreenaqua
color 3a
goto %start%

:lightgreenred
color 4a
goto %start%

:lightgreenpurple
color 5a
goto %start%

:lightgreenyellow
color 6a
goto %start%

:lightgreenwhite
color 7a
goto %start%

:lightgreengray
color 8a
goto %start%

:lightgreenlightblue
color 9a
goto %start%

:lightgreenlightaqua
color ba
goto %start%

:lightgreenlightred
color ca
goto %start%

:lightgreenlightpurple
color da
goto %start%

:lightgreenlightyellow
color ea
goto %start%

:lightgreenbrightwhite
color fa
goto %start%

:lightaqua
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Green             *
echo * (3) Aqua             (b) Light Red               *
echo * (4) Red              (c) Light Purple            *
echo * (5) Purple           (d) Light Yellow            *
echo * (6) Yellow           (e) Bright White            *
echo * (7) White                                        *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto lightaquablack
if %choice%==1 goto lightaquablue
if %choice%==2 goto lightaquagreen
if %choice%==3 goto lightaquaaqua
if %choice%==4 goto lightaquared
if %choice%==5 goto lightaquapurple
if %choice%==6 goto lightaquayellow
if %choice%==7 goto lightaquawhite
if %choice%==8 goto lightaquagray
if %choice%==9 goto lightaqualightblue
if %choice%==a goto lightaqualightgreen
if %choice%==b goto lightaqualightred
if %choice%==c goto lightaqualightpurple
if %choice%==d goto lightaqualightyellow
if %choice%==e goto lightaquabrightwhite
goto lightaqua

:lightaquablack
color 0b
goto %start%

:lightaquablue
color 1b
goto %start%

:lightaquagreen
color 2b
goto %start%

:lightaquaaqua
color 3b
goto %start%

:lightaquared
color 4b
goto %start%

:lightaquapurple
color 5b
goto %start%

:lightaquayellow
color 6b
goto %start%

:lightaquawhite
color 7b
goto %start%

:lightaquagray
color 8b
goto %start%

:lightaqualightblue
color 9b
goto %start%

:lightaqualightgreen
color ab
goto %start%

:lightaqualightred
color cb
goto %start%

:lightaqualightpurple
color db
goto %start%

:lightaqualightyellow
color eb
goto %start%

:lightaquabrightwhite
color fb
goto %start%

:lightred
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Green             *
echo * (3) Aqua             (b) Light Aqua              *
echo * (4) Red              (c) Light Purple            *
echo * (5) Purple           (d) Light Yellow            *
echo * (6) Yellow           (e) Bright White            *
echo * (7) White                                        *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto lightredblack
if %choice%==1 goto lightredblue
if %choice%==2 goto lightredgreen
if %choice%==3 goto lightredaqua
if %choice%==4 goto lightredred
if %choice%==5 goto lightredpurple
if %choice%==6 goto lightredyellow
if %choice%==7 goto lightredwhite
if %choice%==8 goto lightredgray
if %choice%==9 goto lightredlightblue
if %choice%==a goto lightredlightgreen
if %choice%==b goto lightredlightaqua
if %choice%==c goto lightredlightpurple
if %choice%==d goto lightredlightyellow
if %choice%==e goto lightredbrightwhite
goto lightred

:lightredblack
color 0c
goto %start%

:lightredblue
color 1c
goto %start%

:lightredgreen
color 2c
goto %start%

:lightredaqua
color 3c
goto %start%

:lightredred
color 4c
goto %start%

:lightredpurple
color 5c
goto %start%

:lightredyellow
color 6c
goto %start%

:lightredwhite
color 7c
goto %start%

:lightredgray
color 8c
goto %start%

:lightredlightblue
color 9c
goto %start%

:lightredlightgreen
color ac
goto %start%

:lightredlightaqua
color bc
goto %start%

:lightredlightpurple
color dc
goto %start%

:lightredlightyellow
color ec
goto %start%

:lightredbrightwhite
color fc
goto %start%

:lightpurple
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Green             *
echo * (3) Aqua             (b) Light Aqua              *
echo * (4) Red              (c) Light Red               *
echo * (5) Purple           (d) Light Yellow            *
echo * (6) Yellow           (e) Bright White            *
echo * (7) White                                        *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto lightpurpleblack
if %choice%==1 goto lightpurpleblue
if %choice%==2 goto lightpurplegreen
if %choice%==3 goto lightpurpleaqua
if %choice%==4 goto lightpurplered
if %choice%==5 goto lightpurplepurple
if %choice%==6 goto lightpurpleyellow
if %choice%==7 goto lightpurplewhite
if %choice%==8 goto lightpurplegray
if %choice%==9 goto lightpurplelightblue
if %choice%==a goto lightpurplelightgreen
if %choice%==b goto lightpurplelightaqua
if %choice%==c goto lightpurplelightred
if %choice%==d goto lightpurplelightyellow
if %choice%==e goto lightpurplebrightwhite
goto lightpurple

:lightpurpleblack
color 0d
goto %start%

:lightpurpleblue
color 1d
goto %start%

:lightpurplegreen
color 2d
goto %start%

:lightpurpleaqua
color 3d
goto %start%

:lightpurplered
color 4d
goto %start%

:lightpurplepurple
color 5d
goto %start%

:lightpurpleyellow
color 6d
goto %start%

:lightpurplewhite
color 7d
goto %start%

:lightpurplegray
color 8d
goto %start%

:lightpurplelightblue
color 9d
goto %start%

:lightpurplelightgreen
color ad
goto %start%

:lightpurplelightaqua
color bd
goto %start%

:lightpurplelightred
color cd
goto %start%

:lightpurplelightyellow
color ed
goto %start%

:lightpurplebrightwhite
color fd
goto %start%

:lightyellow
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Green             *
echo * (3) Aqua             (b) Light Aqua              *
echo * (4) Red              (c) Light Red               *
echo * (5) Purple           (d) Light Purple            *
echo * (6) Yellow           (e) Bright White            *
echo * (7) White                                        *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto lightyellowblack
if %choice%==1 goto lightyellowblue
if %choice%==2 goto lightyellowgreen
if %choice%==3 goto lightyellowaqua
if %choice%==4 goto lightyellowred
if %choice%==5 goto lightyellowpurple
if %choice%==6 goto lightyellowyellow
if %choice%==7 goto lightyellowwhite
if %choice%==8 goto lightyellowgray
if %choice%==9 goto lightyellowlightblue
if %choice%==a goto lightyellowlightgreen
if %choice%==b goto lightyellowlightaqua
if %choice%==c goto lightyellowlightred
if %choice%==d goto lightyellowlightpurple
if %choice%==e goto lightyellowbrightwhite
goto lightyellow

:lightyellowblack
color 0e
goto %start%

:lightyellowblue
color 1e
goto %start%

:lightyellowgreen
color 2e
goto %start%

:lightyellowaqua
color 3e
goto %start%

:lightyellowred
color 4e
goto %start%

:lightyellowpurple
color 5e
goto %start%

:lightyellowyellow
color 6e
goto %start%

:lightyellowwhite
color 7e
goto %start%

:lightyellowgray
color 8e
goto %start%

:lightyellowlightblue
color 9e
goto %start%

:lightyellowlightgreen
color ae
goto %start%

:lightyellowlightaqua
color be
goto %start%

:lightyellowlightred
color ce
goto %start%

:lightyellowlightpurple
color de
goto %start%

:lightyellowbrightwhite
color fe
goto %start%

:brightwhite
cls
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Green             *
echo * (3) Aqua             (b) Light Aqua              *
echo * (4) Red              (c) Light Red               *
echo * (5) Purple           (d) Light Purple            *
echo * (6) Yellow           (e) Light Yellow            *
echo * (7) White                                        *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p choice=
if %choice%==0 goto brightwhiteblack
if %choice%==1 goto brightwhiteblue
if %choice%==2 goto brightwhitegreen
if %choice%==3 goto brightwhiteaqua
if %choice%==4 goto brightwhitered
if %choice%==5 goto brightwhitepurple
if %choice%==6 goto brightwhiteyellow
if %choice%==7 goto brightwhitewhite
if %choice%==8 goto brightwhitegray
if %choice%==9 goto brightwhitelightblue
if %choice%==a goto brightwhitelightgreen
if %choice%==b goto brightwhitelightaqua
if %choice%==c goto brightwhitelightred
if %choice%==d goto brightwhitelightpurple
if %choice%==e goto brightwhitelightyellow
goto brightwhite

:brightwhiteblack
color 0f
goto %start%

:brightwhiteblue
color 1f
goto %start%

:brightwhitegreen
color 2f
goto %start%

:brightwhiteaqua
color 3f
goto %start%

:brightwhitered
color 4f
goto %start%

:brightwhitepurple
color 5f
goto %start%

:brightwhiteyellow
color 6f
goto %start%

:brightwhitewhite
color 7f
goto %start%

:brightwhitegray
color 8f
goto %start%

:brightwhitelightblue
color 9f
goto %start%

:brightwhitelightgreen
color af
goto %start%

:brightwhitelightaqua
color bf
goto %start%

:brightwhitelightred
color cf
goto %start%

:brightwhitelightpurple
color df
goto %start%

:brightwhitelightyellow
color ef
goto %start%


PS: yes i know i have no life, please don't comment saying it :D

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Select Your Colors

#2 Post by aGerman » 29 May 2011 10:31

OMG :shock:

First:
Doesn't work because of

Code: Select all

.
.
set start= %flee
.
.
goto %start%
.
.

Maybe there are more errors. I didn't check thousands of lines.

Why didn't you use your input directly?

Code: Select all

@echo off

:foreground
cls
set "choiceF="
echo ****************************************************
echo *       Select the text color of the program       *
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Green             *
echo * (3) Aqua             (b) Light Aqua              *
echo * (4) Red              (c) Light Red               *
echo * (5) Purple           (d) Light Purple            *
echo * (6) Yellow           (e) Light Yellow            *
echo * (7) White            (f) Bright White            *
echo *                                                  *
echo *       (g) Just use the default colors            *
echo *         Please select your color scheme          *
echo ****************************************************
set /p "choiceF="
echo "%choiceF%"|findstr /rixc:"\"[0-9a-g]\"" >nul ||goto foreground
if /i "%choiceF%"=="g" goto FF

:background
cls
set "choiceB="
echo ****************************************************
echo *      Select the background color of the program  *
echo *                                                  *
echo * (0) Blue             (8) Light Blue              *
echo * (1) Green            (9) Light Green             *
echo * (2) Aqua             (a) Light Aqua              *
echo * (3) Red              (b) Light Red               *
echo * (4) Purple           (c) Light Purple            *
echo * (5) Yellow           (d) Light Yellow            *
echo * (6) White            (e) Bright White            *
echo * (7) Gray                                         *
echo *                                                  *
echo *         Please select your color scheme          *
echo ****************************************************
set /p "choiceB="
echo "%choiceB%"|findstr /rixc:"\"[0-9a-f]\"" >nul ||goto background

:FF
color %choiceB%%choiceF%
cls
echo Do what ever you want.
pause


Regards
aGerman

th3w1zard1
Posts: 8
Joined: 29 May 2011 08:34

Re: Select Your Colors

#3 Post by th3w1zard1 » 29 May 2011 12:42

the %flee thing was the first line of my actual code. That's why i put it there, it was meant to be changed. And what do you mean about using my input directly?

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: Select Your Colors

#4 Post by orange_batch » 29 May 2011 15:36

With some for loops or whatever, this could be done in a few lines of code. :shock:

th3w1zard1
Posts: 8
Joined: 29 May 2011 08:34

Re: Select Your Colors

#5 Post by th3w1zard1 » 29 May 2011 16:51

wow really? how would i go about doing this?

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: Select Your Colors

#6 Post by orange_batch » 29 May 2011 18:18

th3w1zard1 wrote:wow really? how would i go about doing this?

Well, there's little purpose for this in the first place honestly.

The first rule of programming is to never repeat yourself (unless absolutely necessary, and this almost never happens). Let the computer do it.

This has no error handling, mind you.

Code: Select all

@echo off

set type=text color of the program       *
set default=(g) Just use the default colors
set map= 0123456789abcdef

:colors
echo ****************************************************
echo *       Select the %type%
echo *                                                  *
echo * (0) Black            (8) Gray                    *
echo * (1) Blue             (9) Light Blue              *
echo * (2) Green            (a) Light Green             *
echo * (3) Aqua             (b) Light Aqua              *
echo * (4) Red              (c) Light Red               *
echo * (5) Purple           (d) Light Purple            *
echo * (6) Yellow           (e) Light Yellow            *
echo * (7) White            (f) Bright White            *
echo *                                                  *
echo *       %default%            *
echo ****************************************************
set /p "choice=Please select your color scheme: "
if not defined nextrun if %choice%==g color 0a&goto end

for %%x in (black,blue,green,aqua,red,purple,yellow,white,gray,lightblue,lightgreen,lightaqua,lightred,lightpurple,lightyellow,brightwhite) do (
set /a counter+=1
if #%choice%==#%%x set named=1&call call set colors=%%%%map:~%%counter%%,1%%%%%colors%
)
if not defined named set colors=%choice%%colors%

color %colors%

if not defined nextrun (
set nextrun=1
set type=background color of the program *
set "default=                               "
set choice=
set counter=
set named=
cls
goto colors
)
:end
Last edited by orange_batch on 30 May 2011 11:59, edited 1 time in total.

Cleptography
Posts: 287
Joined: 16 Mar 2011 19:17
Location: scriptingpros.com
Contact:

Re: Select Your Colors

#7 Post by Cleptography » 29 May 2011 19:55

I'm only 13 and this batch business is a little new to me, can someone explain what the purpose of this is...?

th3w1zard1
Posts: 8
Joined: 29 May 2011 08:34

Re: Select Your Colors

#8 Post by th3w1zard1 » 01 Jun 2011 14:30

basically, if you have your own little batch program, you can put this at the beginning of it and you can choose the colors of your batch program. Gives it a little menu for you to choose from
Hope this helps!

th3w1zard1
Posts: 8
Joined: 29 May 2011 08:34

Re: Select Your Colors

#9 Post by th3w1zard1 » 01 Jun 2011 14:32

orange_batch wrote:
th3w1zard1 wrote:wow really? how would i go about doing this?

Well, there's little purpose for this in the first place honestly.

The first rule of programming is to never repeat yourself (unless absolutely necessary, and this almost never happens). Let the computer do it.

This has no error handling, mind you.


Wow, this makes me feel extremely stupid O_o

nitt
Posts: 218
Joined: 22 Apr 2011 02:43

Re: Select Your Colors

#10 Post by nitt » 01 Jun 2011 14:55

th3w1zard1 wrote:
orange_batch wrote:
th3w1zard1 wrote:wow really? how would i go about doing this?

Well, there's little purpose for this in the first place honestly.

The first rule of programming is to never repeat yourself (unless absolutely necessary, and this almost never happens). Let the computer do it.

This has no error handling, mind you.


Wow, this makes me feel extremely stupid O_o


nono, you're not stupid. Just new. Once you start learning, you will start to find it much easier. :3

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: Select Your Colors

#11 Post by orange_batch » 01 Jun 2011 16:08

Yeah, just try and learn what you can.

I'll add though, that my script allows you to choose either the colour name or it's representative value (0-9/a-f). I'm not sure if yours did too.

th3w1zard1
Posts: 8
Joined: 29 May 2011 08:34

Re: Select Your Colors

#12 Post by th3w1zard1 » 08 Jun 2011 02:40

Your code, even though its short, has some problems. Like if you type an invalid set of characters (like blah or something) it gives this weird message and like spazzes out. Mine fixes that by having a goto colors at the end of each if groups, so if you type anything other than the options, it will go back. I know this is also pretty useless, but I was bored, so I made it :P

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: Select Your Colors

#13 Post by orange_batch » 10 Jun 2011 06:28

Yep as I said,

orange_batch wrote:This has no error handling, mind you.

Maybe you could program that in for a fun project. Shouldn't be hard. 8)

Post Reply