Skip to content

Instantly share code, notes, and snippets.

@enijar
Created September 5, 2016 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enijar/aff2acbb0e9df6b33237e784c833ae82 to your computer and use it in GitHub Desktop.
Save enijar/aff2acbb0e9df6b33237e784c833ae82 to your computer and use it in GitHub Desktop.
Print Colours in Terminal
#!/usr/bin/env bash
for i in {0..255} ; do
printf "\x1b[38;5;${i}m%3d " "${i}"
if (( $i == 15 )) || (( $i > 15 )) && (( ($i-15) % 12 == 0 )); then
echo;
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment