Ask coding questions

← Back to all posts
Java Colors
Bunnytoes

I wanted to set the color for the text in java and I got it to get a color, but now I want to set the color, but java doesn't have a SystemColor.setColor(); but it has a SystemColor.getColor();, how can I get it to work?

Voters
Bunnytoes
Comments
hotnewtop
Coder100

Use escape codes instead.

https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

Bunnytoes

@Coder100 ok, thanks edit: it doesn't work