Skip to content

Instantly share code, notes, and snippets.

@PinheiroCosta
Created July 31, 2021 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PinheiroCosta/854b4a44849dee5f9fc1e3a90c2116ba to your computer and use it in GitHub Desktop.
Save PinheiroCosta/854b4a44849dee5f9fc1e3a90c2116ba to your computer and use it in GitHub Desktop.
Variables with color escape sequences
#!/usr/bin/env bash
export RESET="\e[m"
export BOLD="\e[1m"
export DIM="\e[2m"
export ITALIC="\e[3m"
export UNDERLINE="\e[4m"
export BLINK="\e[5m"
export INVERT="\e[7m"
export STRIKE="\e[9m"
export BLACK="\e[30m"
export RED="\e[31m"
export GREEN="\e[32m"
export YELLOW="\e[33m"
export BLUE="\e[34m"
export MAGENTA="\e[35m"
export CYAN="\e[36m"
export WHITE="\e[37m"
export BGBLACK="\e[40m"
export BGRED="\e[41m"
export BGGREEN="\e[42m"
export BGYELLOW="\e[43m"
export BGBLUE="\e[44m"
export BGMAGENTA="\e[45m"
export BGCYAN="\e[46m"
export BGWHITE="\e[47m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment