3 ms·
If you loaded ANSI.SYS in your config.sys, then the procedure is exactly the same. I think this will demonstrate color with ANSI.SYS and/or VT-color: $ cat
by chasil 2y ago
If you loaded ANSI.SYS in your config.sys, then the procedure is exactly the same.
I think this will demonstrate color with ANSI.SYS and/or VT-color:
$ cat rgbdemo.sh
#!/bin/sh
alias p=printf
N=$(p \\033) N="$N[" x=30
for a in Bl R G Y B M C W # Black Red Green Yellow Blue Magenta Cyan White
do eval $a='$N'"'"$(( x))"m'" \
b$a='$N'"'"$((60 + x))"m'" \
${a}bg='$N'"'"$((10 + x))"m'" \
b${a}bg='$N'"'"$((70 + x))"m'" # bX=bright Xbg=background bXbg=brgt bgnd
x=$(( x + 1 ))
done # https://en.wikipedia.org/wiki/ANSI_escape_code
N=$N'0m'
echo "I am $Wbg$R red, $G green, $B and blue $N on a white background."