0

Is there a way, without installing external libraries like Colorama, to change some output text in the command console? Screenshot of an attempt at using termcolor and failing and also color formatting codes

  • Please show your code in the question and not in a linked image. It's much easier to read – olirwin Feb 15 '22 at 14:07
  • 1
    It will depend on OS and terminal program how easy/hard it is and which/how many codes you can use, but you can directly pass ANSI escape codes yourself. – buran Feb 15 '22 at 14:09
  • Does [this](https://stackoverflow.com/questions/287871/how-to-print-colored-text-to-the-terminal) probable duplicate help? – Jakob Stark Feb 15 '22 at 14:09

1 Answers1

0

The most basic appraoch without literally anything else would be to specify the color specifically in each of your print strings.

print('\033[92m This line will print in green color. \033[0m')

For more colors, take a look here

KingOtto
  • 840
  • 5
  • 18