The color of the text terminal can be generated using an ANSI unconventional character sequence. Example:
Echo-e "/033 [44; 37; 5 m me/033 [0 m Cool"
The preceding command sets the background color to blue, the foreground color to white, the font to flash, the output character "me", and then reset the screen to the default settings, the output character "cool ". "E" is an option for the echo command, which is used to activate the parser for special characters. "/033" leads the sequence of unconventional characters. "M" means setting the attribute and ending the unconventional Character Sequence. In this example, the valid characters are "44; 37; 5" and "0 ". Modify "44; 37; 5" to generate a combination of different colors. The values are irrelevant to the order of encoding.
The optional encoding is as follows:
Encoding color/Action
0. Reset the property to the default setting.
1. Set bold
2. Set half brightness (simulate color display)
4. Set the underline to simulate the color of the color display)
5. Set flashing.
7. Set reverse Images
22. Set the general density
24. Close the underline
25 turn off flashing
27 disable reverse image
30 set the black foreground
31 set the red foreground
32. Set the green foreground
33 set the brown foreground
34 set the blue foreground
35 set purple foreground
36 set the blue foreground
37 set the white foreground
38. Set the underline on the default foreground color
39. Disable the underline on the default foreground color
40 set a black background
41 set the red background
42 set a green background
43 set brown background
44 set the blue background
45 set a purple background
46 set the blue background
47 set the white background
49 set the default black background