"tput" is a standard Unix operating system command which is used to
set terminal features. Depending on the system, tput uses the terminfo
or termcap database, as well as looking into the environment for the
terminal type.
Change the Terminal Background Color using tput setb
Using tput, the background color of the screen can be changed as shown below.
$ tput setb 4
Change the Foreground Color using tput setf
You can also change the foreground color of the terminal as shown below.
$ tput setf 5
Note: If you set foreground and background to the same color you
cannot see the cursor. So, to reset, execute “tput reset”.
Color info: 1: red, 2: Green, 3= Yellow, 4= Blue, 5= Purple, 6= Cyan, 7= White
set terminal features. Depending on the system, tput uses the terminfo
or termcap database, as well as looking into the environment for the
terminal type.
Change the Terminal Background Color using tput setb
Using tput, the background color of the screen can be changed as shown below.
$ tput setb 4
Change the Foreground Color using tput setf
You can also change the foreground color of the terminal as shown below.
$ tput setf 5
Note: If you set foreground and background to the same color you
cannot see the cursor. So, to reset, execute “tput reset”.
Color info: 1: red, 2: Green, 3= Yellow, 4= Blue, 5= Purple, 6= Cyan, 7= White
No comments:
Post a Comment