The color of the Teminal terminal can be generated using the ANSI non-normal character sequence.
eg
Echo-e "\033[41;32;1m done \033[0m"
Set the echo output done, the background color is red, the foreground is green, the style is bold, and when finished with the style you set, reset the Echo output style.
"-e" is used to activate the parser for special characters, where "\033[" guides the sequence of unconventional characters, and "M" means to set the property and then end the irregular sequence of characters, in this case the "41;32;1" and "0" characters are really valid.
modifying "41;32;0" can generate a different combination of font styles, with no relationship between the values and the order in which they are encoded.
The encodings you can choose are as follows:
Coded Color/action
0 Reset properties to default settings
1 set Bold
2 Set half brightness (simulate color of color display)
4 Set underline (simulate color of color display)
5 Setting Flicker
7 Setting the reverse image
22 Setting general Density
24 Off underline
25 off flashing
27 Turn off the reverse image
30 setting Black foreground
31 Setting the red foreground
32 Setting Green foreground
33 Setting Brown foreground
34 Setting Blue Foreground
35 Setting Purple foreground
36 Setting Cyan Foreground
37 Setting White foreground
38 underline on the default foreground color
39 Close the underline on the default foreground color
40 Setting black background
41 Setting Red background
42 Setting Green Background
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.