Console Color Classification:
numeric representation of the parameter meaning: display mode: 0 (default), 1 (highlight), 22 (not bold), 4 (underscore), 24 (non-underlined), 5 (blinking), 25 (non-flashing), 7 (inverted), 27 (non-inverting)
Foreground : 30 (black),(red), and(green), the(yellow), the(blue), A(Magenta), the(cyan), 37 (white)
background color: (Black), the(red), the(green), the(yellow), the(blue), the(Magenta), the(cyan), 47 (white)
Source:
1 #!/user/bin/env python2 #-*-coding:utf-8-*-3 #Author:qinjiaxi4 #setting console output font Color5 #format (start character): \033[display mode; foreground color; background colour m6 #Terminator (terminal default setting): \033[0m7 #Red Font8 Print('\033[31;1m')9 Print('-'* 10)Ten Print('I am the sixth generation of the Fire shadow') One Print('-'* 10) A Print('\033[0m') - - #Green Font the Print('\033[32;1m'+'Green'+'\033[0m') - Print('\033[32;1m Green \033[0m') - - #Yellow Font + Print('\033[33;1m Yellow \033[0m') - Print('\033[33;1m'+'Yellow'+'\033[0m') + A #black word on red background at Print('\033[30;41;1m Red Bottom black character \033[0m') - - #black word on white background - Print('\033[30;47;1m Black character \033[0m on white background') - - #General Default Settings in Print('General Default Settings')
Python console for printing color-colored fonts