Apr-10-2020, 12:57 PM
Hello guys,
I tried to colourise the texts in a Python consol applications but the results were a little bit weird.
Firstly, I googled the whole thing and I discovered the ANSI codes. For example, take a look at the following code.
I tried to colourise the texts in a Python consol applications but the results were a little bit weird.
Firstly, I googled the whole thing and I discovered the ANSI codes. For example, take a look at the following code.
print("\033[0;37;40m Normal text\n") print("\033[2;37;40m Underlined text\033[0;37;40m \n") print("\033[1;37;40m Bright Colour\033[0;37;40m \n") print("\033[3;37;40m Negative Colour\033[0;37;40m \n") print("\033[5;37;40m Negative Colour\033[0;37;40m\n")This code is not part of my project, just to let you know what I did. I utlised these stuff in my code but the console remained with black background and white (or light grey) font colour. The funny thing is that in the Jupyter window the ANSI colour codes did work.