Tag:python shel script
1 format: \033[display mode; foreground color m 2 3 description: 4 foreground Background Color Color 5 --------------------------------------- 6 30 40 Black 7 31 41 Red 8 32 42 Green 9 33 43 Yellow 10 34 44 Blue 11 35 45 Purplish Red 12 36 46 Cyan Blue 13 37 47 White 14 display mode significance 15 ------------------------- 16 0 Terminal default Settings 17 1 highlighting 18 4 Use underline 19 5 flashing 20 7 anti-white display 21 8 Invisible 22 23 example:24 \033[1;31;40m <!--1-Highlight 31-foreground color red 40-background Black-- > 25 \033[31m <!--with front color red, back view default terminal colors--> 26 \033[0m <!--Use the terminal default setting, which cancels color settings-
This article is from the "Dream to Reality" blog, please be sure to keep this source http://lookingdream.blog.51cto.com/5177800/1917322
Shell, Python script terminal color output