Package org.drasyl.util
Class Ansi
java.lang.Object
org.drasyl.util.Ansi
Utility to colorize and style Strings with ANSI escape sequences.
Usage:
String msg1 = ansi().red().onBlue().swap().format("Hello %s", name);
String msg2 = ansi().color(MAGENTA).background(GREEN).format("Hello World");
-
Nested Class Summary
-
Field Summary
-
Method Summary
-
Field Details
-
RESET
- See Also:
-
-
Method Details
-
reset
-
color
-
black
-
red
-
green
-
yellow
-
blue
-
purple
-
cyan
-
white
-
background
-
onBlack
-
onRed
-
onGreen
-
onYellow
-
onBlue
-
onMagenta
-
onCyan
-
onWhite
-
bold
-
italic
-
underline
-
swap
-
format
-
format
- Throws:
IllegalFormatException
- If a format string contains an illegal syntax, a format specifier that is incompatible with the given arguments, insufficient arguments given the format string, or other illegal conditions.
-
ansi
-