tput queries the terminfo database for terminal-dependent information.
From tput on Wikipedia:
tputis a standard Unix operating system command which makes use of terminal capabilities.
Depending on the system,
tputuses the terminfo or termcap database, as well as looking into the environment for the terminal type.
tput setab [1-7]
tput setb [1-7]
tput setaf [1-7]
tput setf [1-7]