$ echo -e $GREEN I $YELLOW love $BLUE colour $NORMAL
I love colour
The -e possibility with the echo command is described within the man web page as “allow interpretation of backslash escapes” however it additionally permits these colour choices to work.
How a lot the letters stand out will, in fact, rely upon the background colour in your window, however it is best to see the colours chosen. The NORMAL setting returns the font colour to the default so that you simply don’t find yourself displaying your whole textual content within the final colour used.
To keep away from having two clean characters in between the phrases in your phrase, use a command like this as a substitute:
$ echo -e $GREEN I$YELLOW love$BLUE colour$NORMAL
I like colour
If you would like extra colours, you would add these to your Colours file:
LTGREEN="33[32m"
LTYELLOW="33[33m"
LTBLUE="33[34m"
LTMAGENTA="33[35m"
LTCYAN="33[36m"
LTWHITE="33[37m"
NOTE: If ever you mess up and your textual content colours don’t return to regular, concern the command beneath to repair the issue.
$ echo -e $NORMAL
Background colours
You may also use colour settings to vary the background colour of your display screen. The command proven beneath would change your background colour after the command is issued, leaving the house above it with the prior background colour.