Using Control Panel / Console / Colors, you can configure the console background and text colors.
NOTE: See tip 0336 for how this is stored in the registry.
You can also set the current (non-persistent) backround/text colors at a command prompt:
color BT
where B is the backgroung color and T is the text color, per the following table:
0 | Black |
1 | Blue |
2 | Green |
3 | Aqua |
4 | Red |
5 | Purple |
6 | Yellow |
7 | White |
8 | Grey |
9 | Light Blue |
A | Light Green |
B | Light Aqua |
C | Light Red |
D | Light Purple |
E | Light Yellow |
F | Bright White |
The default is 07, White text on a Black background. To rapidly cycle through all possible color combinations, so you can choose your defaults, run testcolor.bat, which contains:
@echo off CLS setlocal for /l %%i in (0,1,15) do call :cycle1 %%i endlocal goto end :cycle1 set /a cb=%1 if %cb% LSS 10 goto cycle11 if %cb% EQU 10 set cb=A&goto cycle11 if %cb% EQU 11 set cb=B&goto cycle11 if %cb% EQU 12 set cb=C&goto cycle11 if %cb% EQU 13 set cb=D&goto cycle11 if %cb% EQU 14 set cb=E&goto cycle11 set cb=F :cycle11 for /l %%i in (0,1,15) do call :cycle2 %%i goto end :cycle2 set /a cf=%1 if %cf% LSS 10 goto cycle21 if %cf% EQU 10 set cf=A&goto cycle21 if %cf% EQU 11 set cf=B&goto cycle21 if %cf% EQU 12 set cf=C&goto cycle21 if %cf% EQU 13 set cf=D&goto cycle21 if %cf% EQU 14 set cf=E&goto cycle21 set cf=F :cycle21 if %cb% EQU %cf% goto end CLS color %cb%%cf% @echo color %cb%%cf% REM You could use sleep 2 or Sleep 3 instead of pause pause :end
0 comments
Hide comments