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
Asked
Active
Viewed 371 times
0
-
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
-
1It 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 Answers
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
-
I tried this and the output is this: [92m This line will print in green color. [0m – alexvazro Feb 15 '22 at 15:52