ansi-colors.sh 329 Bytes
Newer Older
Ralf Jung's avatar
Ralf Jung committed
1 2
# provide some variables to get colorful output

Ralf Jung's avatar
Ralf Jung committed
3 4
DARKGRAY='0;30'
RED='0;31'
Ralf Jung's avatar
Ralf Jung committed
5
BOLDRED='1;31'
Ralf Jung's avatar
Ralf Jung committed
6
GREEN='0;32'
Ralf Jung's avatar
Ralf Jung committed
7 8 9
BOLDGREEN='1;32'
YELLOW='0;33'
BOLDYELLOW='1;33'
Ralf Jung's avatar
Ralf Jung committed
10
BLUE='0;34'
Ralf Jung's avatar
Ralf Jung committed
11
BOLDBLUE='1;34'
Ralf Jung's avatar
Ralf Jung committed
12
PURPLE='0;35'
Ralf Jung's avatar
Ralf Jung committed
13
BOLDPURPLE='1;35'
Ralf Jung's avatar
Ralf Jung committed
14 15
CYAN='0;36'
WHITE='1;37'
Ralf Jung's avatar
Ralf Jung committed
16 17 18 19

echo_color() {
    # $1: the color
    # $2: the string
Ralf Jung's avatar
Ralf Jung committed
20
    echo -e "\e[${1}m${2}\e[0m"
Ralf Jung's avatar
Ralf Jung committed
21
}