A java library for colored console output, using ANSI escape codes.
The maven artifacts are on Bintray and jcenter.
Download the latest jar.
Maven
Include those settings to be able to resolve jcenter artifacts.
<dependency>
<groupId>info.jdavid.ansi</groupId>
<artifactId>colors</artifactId>
<version>1.0.0</version>
</dependency>
Gradle
Add jcenter to the list of maven repositories.
repositories {
jcenter()
}
dependencies {
compile 'info.jdavid.ansi:colors:1.0.0'
}
java
System.out.println(Colors.RED.foreground("Red foreground"));
System.out.println(Colors.GREEN.background("Green background"));
System.out.println(Colors.colored(Colors.YELLOW, Colors.RED, "Yellow on Red"));