Skip to content

Instantly share code, notes, and snippets.

@lexblagus
Last active March 19, 2020 21:22
Show Gist options
  • Save lexblagus/8c7460b4e983b66397c3c2006e69ae45 to your computer and use it in GitHub Desktop.
Save lexblagus/8c7460b4e983b66397c3c2006e69ae45 to your computer and use it in GitHub Desktop.
Bash colors template
#!/bin/bash
for clbg in {40..47} {100..107} 49 ; do # background
for clfg in {30..37} {90..97} 39 ; do # foreground
for attr in 0 1 2 4 5 7 ; do # formatting
printf "\e[${attr};${clbg};${clfg}m" # colorization
printf "\\\e[${attr};${clbg};${clfg}m" # code text prefix
printf " ░▒▓█▓▒░ " # sample characters
printf "\\\e[0m" # code text suffix
printf "\e[0m" # reset color
printf " " # space between columns
done
echo # newline between foregrounds
done
echo # newline between backgrounds
done
exit 0
@lexblagus
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment