Skip to content

Instantly share code, notes, and snippets.

/colors.sh Secret

Created April 14, 2014 04:58
Show Gist options
  • Save anonymous/78d7d1615d1011c64b9d to your computer and use it in GitHub Desktop.
Save anonymous/78d7d1615d1011c64b9d to your computer and use it in GitHub Desktop.
#1/usr/bin/bash
function ansi_colors_dots() {
echo -e "\033[0m "
for t in {0..15} ; do
echo -ne "\033[38;05;${t}mX "
if [[ $((t % 8)) == 7 ]] ; then echo ; fi
done
echo -e "\033[0m "
for y in {0..5} ; do
for n in {0..5} ; do
for x in {0..5} ; do
t=$((16 + (6*y) + (36*n) + x))
echo -ne "\033[38;05;${t}mX "
done
echo -ne "\033[0m "
done
echo
done
echo -e "\033[0m "
for t in {232..255} ; do
echo -ne "\033[38;05;${t}mX "
done
echo -e "\033[0m "
echo
}
ansi_colors_dots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment