improve color script with a truecolor demonstration

main
Andrew Coleman 2022-09-23 09:18:40 -04:00
parent 80b3d066b3
commit 6647ec0b94
1 changed files with 14 additions and 0 deletions

View File

@ -7,3 +7,17 @@ for j in {1..16}; do
done done
echo echo
done done
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<80; colnum++) {
r = 255-(colnum*255/79);
g = (colnum*510/79);
b = (colnum*255/79);
if (g>255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}'