Created
September 23, 2024 13:32
-
-
Save victor-rds/afa39c33d86a5e24a8b6c48fe95fa205 to your computer and use it in GitHub Desktop.
Color index for Powerline theme of Bash-it (https://github.com/Bash-it/bash-it)
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 | |
| # Print colors index for Bash-It Powerline Theme | |
| # https://github.com/Bash-it/bash-it/ | |
| function clean() { | |
| echo -e "\033[0m $1" | |
| } | |
| for ((j=0; j<=15; j++)); do | |
| echo -n -e "\033[48;5;${j}m $(printf '%03d' ${j}) \033[0m" | |
| done | |
| clean "\n" | |
| for ((i=16; i<=231; i+=36)); do | |
| for ((j=i; j<i+36 && j<=231; j++)); do | |
| echo -n -e "\033[48;5;${j}m $(printf '%03d' ${j}) \033[0m" | |
| done | |
| clean | |
| done | |
| clean | |
| for ((j=232; j<=255; j++)); do | |
| echo -n -e "\033[48;5;${j}m $(printf '%03d' ${j}) \033[0m" | |
| done | |
| clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment