How to change the color and format of the static host/path/user string in the Terminal or iTerm?
What you are looking for us customizing the prompt in the bash shell. Many articles on the web including this one.

This is basically done by setting the variable PS1 e.g.

PS1="\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "


gives for user mark on machine flat



This includes \t as time, \u as user \h as hostname and \w current working directory

The \[ then \octal number \] send commands to the terminal , in this case acting as an xterm and sets the colours.