Search code examples
pythonpython-3.xcolorscolorama

How to add color to text in python?


None of the answers on the internet helped me...

First, I imported colorama

from colorama import Fore

Then, I tried coloring the text...

print(Fore.GREEN + 'some text')

But, instead of colouring the text, it does this crap:

[32msome text

instead of green

can anyone help me?


Solution

  • For Future Reference

    Steps to install colorama

    run cmd as ADMINISTRATOR

    type pip install colorama

    and boom. there you go


    How to use:

    Open the COMMAND LINE, not IDLE

    Use the command listed in the question.