Package dev.prozilla.pine.common.system
Class Ansi
java.lang.Object
dev.prozilla.pine.common.system.Ansi
Utility class for constructing ANSI escape sequences.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic StringSets the color of the given text.static StringSets the background color of the given text.static @NotNull Stringstatic @NotNull Stringstatic StringSets the decoration of the given text.static @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic StringRemoves all ANSI escape codes from a given text.static Colorstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull Stringstatic @NotNull String
-
Field Details
-
RESET
- See Also:
-
BLACK
- See Also:
-
RED
- See Also:
-
GREEN
- See Also:
-
YELLOW
- See Also:
-
BLUE
- See Also:
-
PURPLE
- See Also:
-
CYAN
- See Also:
-
WHITE
- See Also:
-
BLACK_BACKGROUND
- See Also:
-
RED_BACKGROUND
- See Also:
-
GREEN_BACKGROUND
- See Also:
-
YELLOW_BACKGROUND
- See Also:
-
BLUE_BACKGROUND
- See Also:
-
PURPLE_BACKGROUND
- See Also:
-
CYAN_BACKGROUND
- See Also:
-
WHITE_BACKGROUND
- See Also:
-
BOLD
- See Also:
-
DIM
- See Also:
-
ITALIC
- See Also:
-
UNDERLINED
- See Also:
-
-
Method Details
-
reset
-
black
-
red
-
green
-
yellow
-
blue
-
purple
-
cyan
-
white
-
color
@Contract("null, _ -> fail; _, null -> fail; !null, !null -> !null") public static String color(String text, String ansiColor) Sets the color of the given text. -
blackBg
-
redBg
-
greenBg
-
yellowBg
-
blueBg
-
purpleBg
-
cyanBg
-
whiteBg
-
colorBg
@Contract("null, _ -> fail; _, null -> fail; !null, !null -> !null") public static String colorBg(String text, String ansiColorBg) Sets the background color of the given text. -
bold
-
dim
-
italic
-
underline
-
decorate
@Contract("null, _ -> fail; _, null -> fail; !null, !null -> !null") public static String decorate(String text, String ansiDecoration) Sets the decoration of the given text. -
strip
Removes all ANSI escape codes from a given text. -
toColor
-