You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just like Jansi, using system.out.println and passing the generated code from our Ansi class, the dev should be able to print color without our printers. This is less prescriptive.
// (this is pseudocode)Ansi.Attribute.RED_TEXTAnsi.Attribute.YELLOW_BACKAnsi.Attribute.BRIGHT// option 1: simple formatAnsiFormatfError = newAnsiFormat(Attribute.RED_TEXT);
System.out.println(fError.format("This text will be red"));
// option 2: composite formatAnsiFormatfWarning = newAnsiFormat(Attribute.RED_TEXT, Attribute.YELLOW_BACK, Attribute.BRIGHT);
System.out.println(fWarning.format("This text will be bright red with yellow background"));
// option 3: inline formatSystem.out.println(Ansi.colorize("This text will be cyan", Attribute.CYAN_TEXT));
AnsiFormat.format("message") -> callsAnsi.colorize() withinternalstateAnsi.colorize("message", Ansi.Attribute[1ormore]) -> StringwithAnsiCodes, readyforSys.outAnsi.makeItFabulous() -> aliasto .colorize()
The text was updated successfully, but these errors were encountered:
Just like Jansi, using
system.out.println
and passing the generated code from ourAnsi
class, the dev should be able to print color without our printers. This is less prescriptive.The text was updated successfully, but these errors were encountered: