Нет описания https://github.com/anas-elgarhy/JColorfulConsole

Anas Elgarhy a753686b98 up version 3 лет назад
.github 51485fb895 Update maven-publish.yml 3 лет назад
.idea e48743e83c Add artifacts config 3 лет назад
.m2 af33c478bc fix 3 лет назад
Screenshots 3f65a39add Add screenshots 3 лет назад
src 645fb37233 Fix default valu 3 лет назад
.gitignore 26aaf22c77 Add .m2/settings.xml 3 лет назад
CODE_OF_CONDUCT.md aff60febb4 Create CODE_OF_CONDUCT.md 3 лет назад
LICENSE 65d1e790bd Create LICENSE 3 лет назад
README.md 40b4cbcea7 up version 3 лет назад
pom.xml a753686b98 up version 3 лет назад

README.md

JColorfulConsole

JColorfulConsole is a console color library.

Features:

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

How to add this library into your project

Step 1. Add the dependency

<dependency>
    <groupId>com.anas.jcolorfulconsole</groupId>
    <artifactId>jcolorfulconsole</artifactId>
    <version>0.1.5</version>
</dependency>

Step 2. run this command mvn install

Gradle:

Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

	dependencies {
	        implementation 'com.github.Anas-Elgarhy:JColorfulConsole:0.1.5'
	}

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);
    }
}

License: MIT