\[
and \]
sequences are used to encapsulate non-printing characters. An ANSI escape code begins with an octal 033
(the code generated by the esc key), followed by an optional character attribute, followed by an instruction. For example, the code to set the text color to normal (attribute = 0) black text is \033[0;30m
. lists available text colors. Notice that the colors are divided into two groups, differentiated by the application of the bold character attribute (1), which creates the appearance of “light” colors.