Beispiel #1
0
 /// <summary>Sets the color of a variable number of words.</summary>
 /// <param name="value">The string.</param>
 /// <param name="color">The RichTextColor color.</param>
 /// <param name="highlightedIndices">The variable number of word indicies.</param>
 public static string SetColorForWords(this string value, RichTextColor color, params int[] highlightedIndices)
 {
     return(value.SetColorForWords(color.ToString(), highlightedIndices));
 }
 /// <summary>
 /// Return this text with rich text changing the color to the specified color option.
 /// </summary>
 /// <param name="text"></param>
 /// <param name="color"></param>
 /// <returns></returns>
 public static string ColorText(this string text, RichTextColor color)
 {
     return("<color=" + color.ToString() + ">" + text + "</color>");
 }
Beispiel #3
0
 /// <summary>Sets the color of each character of the string.</summary>
 /// <param name="value">The string.</param>
 /// <param name="color">The RichTextColor color.</param>
 public static string SetColor(this string value, RichTextColor color)
 {
     return(value.SetColor(color.ToString()));
 }