I have this python script in which I run in terminal. Currently I am trying to incorporate colors, eg. if it is 'error', the text will be red, if it is 'working', the text will be green.
I have tried to refer to this post that I have found but when I tried to run it in my terminal using the following code:
print('\x1b[0;31;40m' + 'Error!' + '\x1b[0m')
I am getting red text with a greyish background instead of red text with black background. My terminal uses Python 2.6.2.
My question here is: 1. Is there any way to get rid of this 'greyish' background? 2. Instead of setting colors to the background, is there an 'invisible' option? Eg. if I run the command, the printed text background will conform to the terminal background?