批处理颜色命令中有更多颜色选项

时间:2018-02-28 02:10:20

标签: windows batch-file cmd

我试图制作一个批处理脚本,使用颜色函数循环彩虹的彩色文本,但我发现默认的可用颜色没有橙色。 我的问题是:有没有办法可以为color命令添加自定义颜色值,还是我使用默认颜色? 这是我的代码:

@echo off
Rem this script uses the color command and a loop to create rainbow text
Rem use timeout >nul to pause without printing to the screen
title Rainbow
echo RAINBOWS FOR EVERYONE
echo RAINBOWS TEXT!!!
echo HELLO WORLD!
rem this loop causes the text to cycle colors
rem it cycles text color by changing the text color but keeping the background black aka hex code "0"
rem “How much more black could this be?" and the answer is "None...none more black” ~ Spinal Tap
:loop
color 0C
timeout /t 1 /nobreak >nul
color 0E
timeout /t 1 /nobreak >nul
color 0a
timeout /t 1 /nobreak >nul
color 0b
timeout /t 1 /nobreak >nul
color 09
timeout /t 1 /nobreak >nul
color 0d
timeout /t 1 /nobreak >nul
goto loop

1 个答案:

答案 0 :(得分:0)

这看起来是定义颜色的地方。

在Run(Winkey + R)中键入var newArray = removeFromState.filter(function(entry) { return entry.index !== action.index; });

导航至regedit

ColorTable00通常是黑色的。

请参阅http://systemmanager.ru/win2k_regestry.en/34503.htm