public static string ANSI_ColoredString(string line, ANSIColor foreground, ANSIColor background, bool newline = true, ExtendedTextAttribute style = ExtendedTextAttribute.Normal) { string temp = ANSI_StringColor(foreground, background, style); temp += line; temp += ANSI_DefaultColor() + (newline ? "\n" : ""); return temp; }
public static string ANSI_StringColor(ANSIColor foreground, ANSIColor background, ExtendedTextAttribute style = ExtendedTextAttribute.Normal) { return ANSI_ESC + string.Format("[{0};{1};{2}m", (int)style, (int)foreground, (int)background); }