Exemplo n.º 1
0
 /// <summary>
 /// ANSI sequence to set all text attributes in one sequence.
 /// </summary>
 /// <param name="bit">Non-color text attribute</param>
 /// <param name="fbit">Text color</param>
 /// <param name="bbit">Background color</param>
 /// <returns>Formatted ANSI sequence as a string.</returns>
 public static string RichText(AttributeBit bit, FGColorBit fbit, BGColorBit bbit) => Escape + string.Format("[{0};{1};{2}", bit, fbit, bbit);
Exemplo n.º 2
0
 /// <summary>
 /// ANSI sequence to set background to a color.
 /// </summary>
 /// <param name="bit">Color to set background to.</param>
 /// <returns>Formatted ANSI sequence as a string.</returns>
 public static string Color(BGColorBit bit) => ColorText((int)bit);