I'm trying to make a title with coloured ascii for my code, which pops up when launching the code. I already know how to make ascii text but not coloured.
This is what I've been able to make, but now I want to have it in magenta.
result = pyfiglet.figlet_format("By Gxzs", font = "slant" )
print(result)
I've already tried making it myself using colorama and termcolor, but I get a weird output :
title = pyfiglet.figlet_format(colored("By Gxzs", color = "magenta"))
print(title)
A high-level library for "rich" text in the terminal is, well, rich. The colorama library that you mentioned is one of its dependencies.
To display the title in magenta, you would do this:
import pyfiglet
from rich import print
title = pyfiglet.figlet_format('By Gxzs', font='slant')
print(f'[magenta]{title}[/magenta]')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With