Text formatting utilities to easily format text in the terminal for Java.
var text = TextFormatter.of("blue text here, ", TrueColor.of(50, 50, 255))
.addFormat(FormatOption.BOLD, FormatOption.ITALIC)
.concat(TextFormatter.of("now yellow", SimpleColor.BRIGHT_YELLOW))
.concat(" and back to blue");
System.out.println(text);Javadocs for the latest stable version are available online hosted on APIdia and on GitHub pages.
The package is currently available on Maven Central.
Add the following to your dependencies block:
implementation("io.github.darvil82:terminal-text-formatter:+")Note
The + symbol is a wildcard that will automatically use the latest version of the package.
You can also specify a specific version.