Created
May 3, 2022 01:41
-
-
Save alsunseri/59e87d37dfd27c7210679e131651af30 to your computer and use it in GitHub Desktop.
Bourne or bash terminal see/display text in all 256 colors
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
#!/bin/sh | |
# if your TERM is not set to *-256color or the like then run this: | |
# export TERM=xterm-256color | |
i=0 | |
while [ $i -ne 255 ] | |
do | |
i=$(($i+1)) | |
tput setaf $i && echo -n "setaf $i in color tags " | |
tput setaf $i | xxd | |
done | |
# note - this will only change fg text colors | |
# it does not explore underlines, background color or 'bold' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment