Created
July 26, 2017 02:21
-
-
Save connorjan/2b02126868157c2b69f9aa0a052cdc86 to your computer and use it in GitHub Desktop.
Definitions for the shell colors (and other attributes) through tput
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
# Text color - normal | |
fgblack="$(tput setaf 0)" # Black | |
fgred="$(tput setaf 1)" # Red | |
fggreen="$(tput setaf 2)" # Green | |
fgyellow="$(tput setaf 3)" # Yellow | |
fgblue="$(tput setaf 4)" # Blue | |
fgpurple="$(tput setaf 5)" # Purple | |
fgcyan="$(tput setaf 6)" # Cyan | |
fgwhite="$(tput setaf 7)" # White | |
# Text color - bright | |
bfgblack="$(tput setaf 8)" # Black | |
bfgred="$(tput setaf 9)" # Red | |
bfggreen="$(tput setaf 10)" # Green | |
bfgyellow="$(tput setaf 11)" # Yellow | |
bfgblue="$(tput setaf 12)" # Blue | |
bfgpurple="$(tput setaf 13)" # Purple | |
bfgcyan="$(tput setaf 14)" # Cyan | |
bfgwhite="$(tput setaf 15)" # White | |
# Background color - normal | |
bgblack="$(tput setab 0)" # Black - Background | |
bgred="$(tput setab 1)" # Red | |
bggreen="$(tput setab 2)" # Green | |
bgyellow="$(tput setab 3)" # Yellow | |
bgblue="$(tput setab 4)" # Blue | |
bgpurple="$(tput setab 5)" # Purple | |
bgcyan="$(tput setab 6)" # Cyan | |
bgwhite="$(tput setab 7)" # White | |
# Background color - bright | |
bbgblack="$(tput setab 8)" # Black - Background - Bright | |
bbgred="$(tput setab 9)" # Red | |
bbggreen="$(tput setab 10)" # Green | |
bbgyellow="$(tput setab 11)" # Yellow | |
bbgblue="$(tput setab 12)" # Blue | |
bbgpurple="$(tput setab 13)" # Purple | |
bbgcyan="$(tput setab 14)" # Cyan | |
bbgwhite="$(tput setab 15)" # White | |
# Other attributes | |
normal="$(tput sgr0)" # text reset | |
bold="$(tput bold)" # make bold | |
underline="$(tput smul)" # underline | |
nounderlin="$(tput rmul)" # remove underline | |
mkblink="$(tput blink)" # make blink | |
reverse="$(tput rev)" # reverse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment