improve color script with a truecolor demonstration
parent
80b3d066b3
commit
6647ec0b94
|
@ -7,3 +7,17 @@ for j in {1..16}; do
|
|||
done
|
||||
echo
|
||||
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";
|
||||
}'
|
Loading…
Reference in New Issue