Python console for printing color-colored fonts

Source: Internet
Author: User

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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.