printing with colors

Solutions on MaxInterview for printing with colors by the best coders in the world

showing results for - "printing with colors"
Michele
13 Jul 2017
1CEND      = '\33[0m'
2CBOLD     = '\33[1m'
3CITALIC   = '\33[3m'
4CURL      = '\33[4m'
5CBLINK    = '\33[5m'
6CBLINK2   = '\33[6m'
7CSELECTED = '\33[7m'
8
9CBLACK  = '\33[30m'
10CRED    = '\33[31m'
11CGREEN  = '\33[32m'
12CYELLOW = '\33[33m'
13CBLUE   = '\33[34m'
14CVIOLET = '\33[35m'
15CBEIGE  = '\33[36m'
16CWHITE  = '\33[37m'
17
18CBLACKBG  = '\33[40m'
19CREDBG    = '\33[41m'
20CGREENBG  = '\33[42m'
21CYELLOWBG = '\33[43m'
22CBLUEBG   = '\33[44m'
23CVIOLETBG = '\33[45m'
24CBEIGEBG  = '\33[46m'
25CWHITEBG  = '\33[47m'
26
27CGREY    = '\33[90m'
28CRED2    = '\33[91m'
29CGREEN2  = '\33[92m'
30CYELLOW2 = '\33[93m'
31CBLUE2   = '\33[94m'
32CVIOLET2 = '\33[95m'
33CBEIGE2  = '\33[96m'
34CWHITE2  = '\33[97m'
35
36CGREYBG    = '\33[100m'
37CREDBG2    = '\33[101m'
38CGREENBG2  = '\33[102m'
39CYELLOWBG2 = '\33[103m'
40CBLUEBG2   = '\33[104m'
41CVIOLETBG2 = '\33[105m'
42CBEIGEBG2  = '\33[106m'
43CWHITEBG2  = '\33[107m'
44
45#example:
46print(CRED2, "This will be typed in red", CEND)