Ejemplo n.º 1
0
		/// <summary>
		/// Colorizes the given message with the given color.
		/// </summary>
		/// <param name="msg">the message to colorize</param>
		/// <param name="color">the color value</param>
		/// <param name="enclose">whether to only have this string in the given color or to let the color code open for following text</param>
		/// <returns>a colorized string</returns>
		public static string Colorize(string msg, Color color, bool enclose)
		{
			return "|cff" + color.GetHexCode() + msg + (enclose ? "|r" : "");
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Colorizes the given message with the given color.
		/// </summary>
		/// <param name="msg">the message to colorize</param>
		/// <param name="color">the color value</param>
		/// <returns>a colorized string</returns>
		public static string Colorize(string msg, Color color)
		{
			return Colorize(msg, color, true);
		}