Skip to content

Instantly share code, notes, and snippets.

@perpetual-hydrofoil
Last active April 2, 2018 17:20
Show Gist options
  • Save perpetual-hydrofoil/630e4629d62ca00f5d2d4339ed9d47b0 to your computer and use it in GitHub Desktop.
Save perpetual-hydrofoil/630e4629d62ca00f5d2d4339ed9d47b0 to your computer and use it in GitHub Desktop.
ANSI Colors
export ESC_CHAR="$(echo -e "\033")"
export BLACK_TEXT="${ESC_CHAR}[30m"
export RED_TEXT="${ESC_CHAR}[31m"
export GREEN_TEXT="${ESC_CHAR}[32m"
export YELLOW_TEXT="${ESC_CHAR}[33m"
export BLUE_TEXT="${ESC_CHAR}[34m"
export PURPLE_TEXT="${ESC_CHAR}[35m"
export CYAN_TEXT="${ESC_CHAR}[36m"
export WHITE_TEXT="${ESC_CHAR}[37m"
export BLACK_BACKGROUND="${ESC_CHAR}[40m"
export RED_BACKGROUND="${ESC_CHAR}[41m"
export GREEN_BACKGROUND="${ESC_CHAR}[42m"
export YELLOW_BACKGROUND="${ESC_CHAR}[43m"
export BLUE_BACKGROUND="${ESC_CHAR}[44m"
export PURPLE_BACKGROUND="${ESC_CHAR}[45m"
export CYAN_BACKGROUND="${ESC_CHAR}[46m"
export WHITE_BACKGROUND="${ESC_CHAR}[47m"
export BOLD_TEXT="${ESC_CHAR}[1m"
export RESET_COLOR="${ESC_CHAR}[0m"
echo $RED_BACKGROUND$WHITE_TEXT HELLO $WHITE_BACKGROUND$BLUE_TEXT WORLD $RESET_COLOR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment