nick34992
2/21/2017 - 3:16 PM

Bash: tput, setab, echo: Set Terminal Background Color

Bash: tput, setab, echo: Set Terminal Background Color

#!/bin/bash

tput setab 0
echo "BLACK BACKGROUND"
tput setab 1
echo "RED BACKGROUND"
tput setab 2
echo "GREEN BACKGROUND"
tput setab 3
echo "YELLOW BACKGROUND"
tput setab 4
echo "BLUE BACKGROUND"
tput setab 5
echo "MAGENTA BACKGROUND"
tput setab 6
echo "CYAN BACKGROUND"
tput setab 7
echo "WHITE BACKGROUND"
sleep 5
tput reset