예제 #1
0
 public static StringBuilder BeginColor(this StringBuilder builder, AnsiColor color)
 {
     return(builder.Append(color.AnsiColorEscapeCode()));
 }
예제 #2
0
 public static string Colorize(this string value, AnsiColor color) =>
 $"{color.AnsiColorEscapeCode()}{value}{AnsiColor.None.AnsiColorEscapeCode()}";