Colorful text on console | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Colorful text on console

Hey there! How can i write a text with a color on console? For example how can i print("hello there") and make the string to be red?

5th Dec 2017, 8:53 PM
Aref moloughi
Aref moloughi - avatar
1 Answer
+ 1
Probably you need a terminal witch support color output... If you have one you can use ANSI escape sequences
5th Dec 2017, 9:10 PM
Dima Makieiev
Dima Makieiev - avatar