Color change? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Color change?

I want to change the text color with background, how can I change the text color in online compiler without use of swing and awt?

12th Feb 2023, 12:26 PM
Sakshi
Sakshi - avatar
6 Answers
+ 3
For text you can do something like: System.out.println("\u001B31;1mhello world!");
12th Feb 2023, 3:26 PM
BroFar
BroFar - avatar
+ 2
BroFar Sir unicode character doesn't work, actually yesterday I make execute comment program and this(execute comment) program is based on unicode character so yesterday program is not work also in sololearn. https://code.sololearn.com/cDwgVfskm5Fo/?ref=app
12th Feb 2023, 4:21 PM
Sakshi
Sakshi - avatar
+ 1
Sakshi yes it doesn't work here but should elsewhere.
12th Feb 2023, 4:38 PM
BroFar
BroFar - avatar
+ 1
Oh ok Sir, thank you, but can you suggest me other way to change the text color in sololearn
12th Feb 2023, 4:41 PM
Sakshi
Sakshi - avatar
+ 1
Ok Mirielle mam, thank you
13th Feb 2023, 3:19 AM
Sakshi
Sakshi - avatar
+ 1
Try with javafx
14th Feb 2023, 7:25 PM
A S Raghuvanshi
A S Raghuvanshi - avatar