You may "change the colors for the rest of the text promted by CMD" (that is not the same of "show text in a given color") with the aid of PowerShell, but the method is s-l-o-w...
@echo off
echo Standard color
call :SetColor Yellow/Blue
set /P "=Hello" < NUL
call :SetColor Magenta/DarkGreen
echo World!
goto :EOF
:SetColor fore/back
for /F "tokens=1,2 delims=/" %%a in ("%~1") do (
PowerShell $host.UI.RawUI.BackgroundColor = '%%b'; $host.UI.RawUI.ForegroundColor = '%%a'
)
exit /B
The colors set via this method are used in all posterior text displayed in the cmd.exe window!
Available color names:
Black DarkGray
DarkBlue Blue
DarkGreen Green
DarkCyan Cyan
DarkRed Red
DarkMagenta Magenta
DarkYellow Yellow
Gray White