我目前正在尝试创建一个非常简单的脚本,使用echo显示每个选项,向用户显示所有COLOR选项。我有点不知道如何接受用户输入并改变用户输入的前景色和背景色。这是我现在拥有的:
echo 0 = Black
echo 8 = Gray
echo 1 = Blue
echo 9 = Light Blue
echo 2 = Green
echo A = Light Green
echo 3 = Aqua
echo B = Light Aqua
echo 4 = Red
echo C = Light Red
echo 5 = Purple
echo D = Light Purple
echo 6 = Yellow
echo E = Light Yellow
echo 7 = White
echo F = Bright White
SET /P COLOR COLOR="Please choose two colors from the list above and type in the hex value: "
PAUSE
提前致谢!
答案 0 :(得分:0)
您必须先获取输入,然后更改颜色。
SET /P COLOR="Please choose two colors from the list above and type in the hex value: "
COLOR %COLOR%