Package com.embabel.common.util
Class AnsiBuilderKt
-
- All Implemented Interfaces:
public final class AnsiBuilderKt
-
-
Method Summary
Modifier and Type Method Description final static Triple<Integer, Integer, Integer>hexToRgb(Integer hexValue)final static Stringansi(String text, String styles)Applies ANSI formatting with the specified style codes final static Stringcolor(String $self, String color)final static Stringcolor(String $self, Triple<Integer, Integer, Integer> rgb)final static Stringcolor(String $self, Integer rgb)final static StringbgColor(String $self, String color)final static Stringbold(String $self)final static Stringitalic(String $self)final static Stringunderline(String $self)final static StringconcatFormatted(String parts)final static Stringstyled(String $self, Function1<AnsiBuilder, AnsiBuilder> setup)-
-
Method Detail
-
ansi
final static String ansi(String text, String styles)
Applies ANSI formatting with the specified style codes
- Parameters:
text- The text to formatstyles- ANSI style/color codes to apply- Returns:
The formatted text with ANSI escape sequences
-
concatFormatted
final static String concatFormatted(String parts)
-
styled
final static String styled(String $self, Function1<AnsiBuilder, AnsiBuilder> setup)
-
-
-
-