How can my text output flash different colors? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How can my text output flash different colors?

My prof wanted our program to flash at least 5 different colors on our output text, i just want to know how to do that. (Sorta like christmas lights)

24th Nov 2019, 11:44 AM
Defective Ryan
Defective Ryan - avatar
1 ответ
+ 2
as ~ swim ~ said, you can either use ANSI escape codes or win32 api to create coloured text. and it depends on which platform you are trying to make it for. if you want to make the program for the Mac/Linux environment then you can use ANSI escape codes but it won't work on windows. for windows only win32 api can change the text color.
25th Nov 2019, 7:49 AM
Shen Bapiro
Shen Bapiro - avatar