Last active
March 10, 2018 04:13
-
-
Save amelialaundy/485c8df307e34dcdda2c6898406237d6 to your computer and use it in GitHub Desktop.
get all colours available in terminal and their corresponding number https://github.com/sorin-ionescu/prezto/tree/master/modules/spectrum
This file contains hidden or 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/bash | |
color(){ | |
for c; do | |
printf '\e[48;5;%dm%03d' $c $c | |
done | |
printf '\e[0m \n' | |
} | |
IFS=$' \t\n' | |
color {0..15} | |
for ((i=0;i<6;i++)); do | |
color $(seq $((i*36+16)) $((i*36+51))) | |
done | |
color {232..255} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment