Assuming your terminal emulator is accepting ansi color sequences, which is nowadays almost always the case, you can send escape sequences that change the foreground and background colors.
e.g.: System.out.println("\033[31m\033[44mHello world\033[0m\n");
|