echo -e "\033[31m Hello World"
The [31m
controls the text color:
30
-37
sets foreground color
40
-47
sets background color
A more complete list of color codes can be found here.
It is good practice to reset the text color back to \033[0m
at the end of the string.