\033[30m--\033[37m setting foreground color
Print ("\033[35m hello,world! \033[0m")
View Code
\033[40m--\033[47m Set background color
Print ("\033[45m hello,world! \033[0m")
View Code
Highlighting, underlining, anti-white display
Print ("\033[31m hello,world! \033[0m")print("\033[1;31m hello,world! \033[0m")print("\033[7;31m hello,world! \033[0m")
View Code
Print ("\033[1;31;40m hello,world! \033[0m ")
------------------------------------------
Font Color | Word Back Color | Color Description------------------------------------------ | | Black | | Red | | Green | | Yellow Color | | Blue | | Purplish Red | | Cyan Blue Panax Notoginseng | | White-------------------------------------------
-------------------------------
Display Mode | Effect-------------------------------0 | Terminal default settings 1 | Highlight 4 | Use underscore 7 | Anti-white display-------------------------------
-------------------------------
Color settings for Python command line output