Created
September 5, 2016 11:29
-
-
Save enijar/aff2acbb0e9df6b33237e784c833ae82 to your computer and use it in GitHub Desktop.
Print Colours 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
#!/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