Files
git-aware-prompt/colors.sh
lethosor 2e6be7986e Use tput to generate color codes
This allows "echo", among other commands, to use these sequences under OS X
2014-08-26 13:40:54 -04:00

42 lines
1.3 KiB
Bash

# Regular
txtblk="$(tput setaf 0)" # Black
txtred="$(tput setaf 1)" # Red
txtgrn="$(tput setaf 2)" # Green
txtylw="$(tput setaf 3)" # Yellow
txtblu="$(tput setaf 4)" # Blue
txtpur="$(tput setaf 5)" # Purple
txtcyn="$(tput setaf 6)" # Cyan
txtwht="$(tput setaf 7)" # White
# Bold
bldblk="$(tput setaf 0)$(tput bold)" # Black
bldred="$(tput setaf 1)$(tput bold)" # Red
bldgrn="$(tput setaf 2)$(tput bold)" # Green
bldylw="$(tput setaf 3)$(tput bold)" # Yellow
bldblu="$(tput setaf 4)$(tput bold)" # Blue
bldpur="$(tput setaf 5)$(tput bold)" # Purple
bldcyn="$(tput setaf 6)$(tput bold)" # Cyan
bldwht="$(tput setaf 7)$(tput bold)" # White
# Underline
undblk="$(tput setaf 0)$(tput smul)" # Black
undred="$(tput setaf 1)$(tput smul)" # Red
undgrn="$(tput setaf 2)$(tput smul)" # Green
undylw="$(tput setaf 3)$(tput smul)" # Yellow
undblu="$(tput setaf 4)$(tput smul)" # Blue
undpur="$(tput setaf 5)$(tput smul)" # Purple
undcyn="$(tput setaf 6)$(tput smul)" # Cyan
undwht="$(tput setaf 7)$(tput smul)" # White
# Background
bakblk="$(tput setab 0)" # Black
bakred="$(tput setab 1)" # Red
bakgrn="$(tput setab 2)" # Green
bakylw="$(tput setab 3)" # Yellow
bakblu="$(tput setab 4)" # Blue
bakpur="$(tput setab 5)" # Purple
bakcyn="$(tput setab 6)" # Cyan
bakwht="$(tput setab 7)" # White
txtrst="$(tput sgr 0)" # Text Reset