System.out.println("\033[47;31mhello world\033[5m");
Word 47 is a background color, font color 31 is, hello world string. Behind \ 033 [5m is a control code.
color code:
QUOTE:
Background color range word: Word 40--49 Color: 30--39
40: 30 Black: Black
41: Red 31: Red
42: Green 32: Green
43: 33 Yellow: Yellow
44: 34 Blue: Blue
45: 35 Purple: Purple
46: 36 dark green: Dark Green
47: 37 white: White
ANSI control codes:
QUOTE:
\ 033 [0m close all properties
\ 033 [1m high luminance disposed
\ 03 [4m underscore
\ 033 [5m flashes
\ 033 [7m black reverse
\ 033 [8m blanking
\ 033 [30m - \ 033 [37m set the foreground color
\ 033 [40m - \ 033 [47m set the background color
\ 033 [nA cursor on the line n
\ 03 [nB cursor down the line n
\ 033 [nC cursor right row n
\ 033 [nD cursor to the left line n
\ 033 [y; xH set the cursor position
\ 033 [2J clear screen
\ 033 [K clears the contents from the cursor to the end of the
\ 033 [s Save Cursor Position
\ 033 [u restore the cursor position
\ 033 [? 25l hide the cursor
\ 33 [? 25h display cursor