Changing the color of characters in the prompt (or shell), make them more readable. If you are using colors group, you can sense by color, this will eliminate the risk of having a lengthy command prompt.
Information that can be transmitted by the colors
You can assign the green commands for a first machine (host) and blue for another, or green when the system is not loaded, yellow when resources are used or you choose a color for root prompt, another for an MC ...
Two methods are available are possible. The most used (but the less effective) is to insert escape characters. The following shows the chain commands in blue:
This method has two major drawbacks: its syntax is unreadable, so prone to entry errors, and it is only applicable if the terminal window supports ANSI escape sequence,
$ BLUE=$ (tput setaf 4) $ BLACK=$ (tput setaf 0) $ PS1=" [$BLUE] u@h] [$BLACK] "