I'm trying to print several sentences with different colors, but it won't work, I only got 2 colors, the normal blue and this red
import sys
from colorama import init, AnsiToWin32stream = AnsiToWin32(sys.stderr).streamprint(">>> This is red.", file=stream)
As discussed in the comments, change your code to use these features;
import os, colorama
from colorama import Fore,Style,Back
colorama.init()print(Fore.RED + 'some red text')
print(Back.GREEN + 'and with a green background')
print(Style.BRIGHT + 'and in bright text')
print(Style.RESET_ALL)
print('back to normal now')
These are much easier to use and do job. The available colours you can use for Fore
or Back
are;
- Red
- Cyan
- Green
- Yellow
- Black
- Magenta
- Blue
- White
These will all be needed to be put in capitals.
And for Style
you can use;
These will also need to be in capitals.
Have fun using colorama :)