Created
January 5, 2016 10:44
-
-
Save yous/c303055cf65a99d65488 to your computer and use it in GitHub Desktop.
Print 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
#!/usr/bin/env bash | |
for i in {0..7}; do | |
next=$((${i} + 8)) | |
printf "\x1b[38;5;${i}mcolour${i} \x1b[38;5;${next}mcolour${next}\n" | |
done | |
for i in {16..255}; do | |
printf "\x1b[38;5;${i}mcolour${i} " | |
if [[ $((${i} % 6)) == 3 ]]; then | |
printf "\n" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment