several months, and finally I could not boot at all and repair failed many times. Then I used DELL repair tools
to reinstall Windows and wipe the hard disk of everything.
Now I find that the cmd window is limited to 16 colors. See sample code below. Only 2 colors show up.
The result should be a string of red characters, from darker to lighter.
I've gone through Window Display changes, tried another monitor, installed Acer (monitor) profile, and nothing works.
I specifically opened cmd.exe in \system32 and \sysWOW64 as administrator, with no difference in the 16 color limit.
There are no color issues other than in the cmd window.
The code displays correctly on my laptop.
Has anyone had this limitation and found a solution?
Jerry
Code: Select all
@echo off
setlocal EnableDelayedExpansion
For /F %%a In ('echo prompt $E^| cmd') Do set "ESC=%%a"
set "reset=%ESC%[0m"
set "ch255=Û"
set "r=100" & set "g=6" & set "b=16"
set "string="
For /L %%c In (1 1 40)Do (
set "string=!string!e[38;2;!r!;!g!;!b!m%ch255%"
set /A "r+=3"
If !g! gtr 0 set /A "g-=1"
)
echo !string:e[=%ESC%[!%reset%