Created
October 4, 2020 23:33
-
-
Save catc/9776e8adf0ebd9ab491f4a89f24e0db3 to your computer and use it in GitHub Desktop.
display 8 bit ansi colors in terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {0..255} ; do | |
printf "\x1b[38;5;%sm%5d\e[0m " "$i" "$i" | |
if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then | |
printf "\n"; | |
fi | |
done | |
for i in {0..255} ; do | |
printf "\e[1m\x1b[38;5;%sm%10d\e[0m " "$i" "$i" | |
if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then | |
printf "\n"; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment