Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Easy bash colors
color() {
echo -e "\033[0;$1m$2\033[0m"
}
echo_red() {
color 31 "$1"
}
echo_green() {
color 32 "$1"
}
echo_yellow() {
color 33 "$1"
}
echo_blue() {
color 34 "$1"
}
echo_purple() {
color 35 "$1"
}
echo_cyan() {
color 36 "$1"
}
echo_white() {
color 37 "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment