A library that helps you to print colored and styled text in the Java console 🖌🖌🖌️
Find a file
2022-03-25 17:34:09 +02:00
.idea Add git tool box config 2022-03-24 19:34:45 +02:00
Screenshots Add screenshots 2022-03-25 17:15:31 +02:00
src/main/java/com/anas/jcolorfulconsole Fix default valu 2022-03-25 16:51:01 +02:00
.gitignore Add git ignore file 2022-03-25 01:34:15 +02:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2022-03-25 01:45:55 +02:00
LICENSE Create LICENSE 2022-03-25 01:46:31 +02:00
pom.xml Fix version 2022-03-25 17:34:09 +02:00
README.md Add more examples 2022-03-25 17:14:38 +02:00

JColorfulConsole

JColorfulConsole is a console color library.

Features:

  • Support text color.
  • Support background color.
  • Support text style.

Usage:

ConsoleManager manager = new DefaultConsoleManager(); // Create a new console manager
manager.setTextColor(TextColor.LIGHT_RED); // Set text color
manager.setBackgroundColor(BackgroundColor.DARK_BLUE); // Set background color
   
manager.println("Hello World!"); // Print text
ConsoleManager manager = new DefaultConsoleManager(); // Create a new console manager
manager.setTextColor(TextColor.LIGHT_RED); // Set text color
manager.setBackgroundColor(BackgroundColor.DARK_BLUE); // Set background color
manager.setTextStyle(TextStyle.ITALIC); // Set text style

manager.println("Hello World!"); // Print text
public class Example1 {
    public static void main(String[] args) {
        ConsoleManager manager = new DefaultConsoleManager();

        manager.print("Hello", BackgroundColor.DARK_YELLOW, TextColor.DARK_WHITE, TextStyle.BOLD, TextStyle.ITALIC);
        manager.print(", ", TextColor.LIGHT_GREEN);
        manager.print("I'm ", TextColor.DARK_YELLOW);
        manager.print("Anas", TextColor.LIGHT_BLUE, TextStyle.DOUBLE_UNDERLINE);
        manager.println(" :D", TextColor.LIGHT_CYAN);
        manager.println("\tFrom", TextColor.LIGHT_RED, TextStyle.ITALIC);
        manager.print("Eg", BackgroundColor.LIGHT_RED);
        manager.print("y", BackgroundColor.DARK_WHITE);
        manager.print("pt", BackgroundColor.DARK_BLACK);
    }
}