Created
August 26, 2016 16:04
-
-
Save rednebmas/0cab58c33221bbde758be074958172cb to your computer and use it in GitHub Desktop.
Prints all bash prompt colors
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
| # Thanks to plasmarob (http://unix.stackexchange.com/a/285956) | |
| function colorgrid( ) | |
| { | |
| iter=16 | |
| while [ $iter -lt 52 ] | |
| do | |
| second=$[$iter+36] | |
| third=$[$second+36] | |
| four=$[$third+36] | |
| five=$[$four+36] | |
| six=$[$five+36] | |
| seven=$[$six+36] | |
| if [ $seven -gt 250 ];then seven=$[$seven-251]; fi | |
| echo -en "\033[38;5;$(echo $iter)m█ " | |
| printf "%03d" $iter | |
| echo -en " \033[38;5;$(echo $second)m█ " | |
| printf "%03d" $second | |
| echo -en " \033[38;5;$(echo $third)m█ " | |
| printf "%03d" $third | |
| echo -en " \033[38;5;$(echo $four)m█ " | |
| printf "%03d" $four | |
| echo -en " \033[38;5;$(echo $five)m█ " | |
| printf "%03d" $five | |
| echo -en " \033[38;5;$(echo $six)m█ " | |
| printf "%03d" $six | |
| echo -en " \033[38;5;$(echo $seven)m█ " | |
| printf "%03d" $seven | |
| iter=$[$iter+1] | |
| printf '\r\n' | |
| done | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment