public static string GetAttributeColorized(this Iactor character, string name) { string result = ""; name = name.CamelCaseWord(); double value = character.GetAttributeValue(name); double max = character.GetAttributeMax(name); if (value >= max * HighHealth) { result = value.ToString().FontColor(Utils.FontForeColor.GREEN); } else if (value < max * HighHealth && value >= max * LowHealth) { result = value.ToString().FontColor(Utils.FontForeColor.YELLOW); } else if (value < max * LowHealth && value > 0) { result = value.ToString().FontColor(Utils.FontForeColor.RED); } else { result = value.ToString().FontColor(Utils.FontForeColor.RED).FontStyle(Utils.FontStyles.BOLD); } return(result); }