mirror of
https://github.com/anas-elgarhy/JColorfulConsole.git
synced 2024-08-14 23:57:19 +00:00
Add docs
This commit is contained in:
parent
68e4c79239
commit
fca9e36b35
2 changed files with 119 additions and 41 deletions
63
README.md
63
README.md
|
@ -6,7 +6,12 @@
|
|||
### Features:
|
||||
- Support text color.
|
||||
- Support background color.
|
||||
- Support 256 colors (RGB).
|
||||
- Support ANSI colors.
|
||||
- Support indexed colors.
|
||||
- Support text style.
|
||||
- Lightweight and fast.
|
||||
- Easy to use.
|
||||
|
||||
### How to add this library into your project
|
||||
**Step 1**. Add the dependency
|
||||
|
@ -17,7 +22,6 @@
|
|||
<version>0.1.5</version>
|
||||
</dependency>
|
||||
```
|
||||
**Step 2**. run this command `mvn install`
|
||||
|
||||
#### Gradle:
|
||||
**Step 1**. Add the JitPack repository to your build file<br>
|
||||
|
@ -37,43 +41,30 @@ allprojects {
|
|||
}
|
||||
```
|
||||
|
||||
### Usage:
|
||||
```java
|
||||
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
|
||||
```
|
||||
<img src="./Screenshots/1.png">
|
||||
## Usage:
|
||||
|
||||
```java
|
||||
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
|
||||
## Requirements for development:
|
||||
- Maven
|
||||
- jdk 17
|
||||
- IntelliJ IDEA (not required but recommended)
|
||||
|
||||
manager.println("Hello World!"); // Print text
|
||||
```
|
||||
<img src="./Screenshots/2.png">
|
||||
## TODO
|
||||
- [ ] Add Tests
|
||||
- [ ] Add Formatter
|
||||
- [ ] Add Documentation
|
||||
- [ ] Add more examples
|
||||
|
||||
```java
|
||||
public class Example1 {
|
||||
public static void main(String[] args) {
|
||||
ConsoleManager manager = new DefaultConsoleManager();
|
||||
### Available in
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
```
|
||||
<img src="./Screenshots/3.png">
|
||||
[](https://github.com/Anas-Elgarhy/jpwd)
|
||||
[](https://gitlab.com/java-utils1/jpwd)
|
||||
[](https://bitbucket.org/anas_elgarhy/jpwd)
|
||||
[](https://codeberg.org/java-utils/jpwd)
|
||||
|
||||
#### License: MIT
|
||||
|
||||
[](https://sonarcloud.io/summary/new_code?id=Anas-Elgarhy_jpwd)
|
||||
|
||||
|
||||
[](https://sonarcloud.io/summary/new_code?id=Anas-Elgarhy_jpwd)
|
||||
|
||||

|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue