DEV Community

Hamza Hesham
Hamza Hesham

Posted on

Print coloured text in python

Hello,Today we will print coloured text in python.
First, we will install ansi-colours moudle.

pip install ansi-colours

After installing we will import ansi-colours as colour
then print your sentence after choosing the color.

from ansi_colours import AnsiColours as colour
print('Follow') +'ME!'))
Enter fullscreen mode Exit fullscreen mode

Alt Text
Buy Me A Coffee
buy me a coffee :
Don't forget to follow me.
Thanks for reading.

Top comments (2)

artis3n profile image
Ari Kalfus

colored is a nice library for colorized text as well

delta456 profile image
Swastik Baranwal

Nice post but colorama is better than this one.