public string Format(float value) { string color = this.color; if (string.IsNullOrEmpty(color)) { color = value >= 0 ? ColorCatalog.ColorIndex.Tier2Item.ToHex() : ColorCatalog.ColorIndex.Tier3Item.ToHex(); } NumberFormatInfo numInfo = new NumberFormatInfo { PercentPositivePattern = 1 }; var valueStr = value.ToString("P2", numInfo).Color(color); var stack = string.Empty; if (modifierIndex != ItemIndex.None) { stack = $" ({ContextProvider.ItemStacks(modifierIndex)})"; } return($"\t{modifierName}{stack}: {valueStr}"); }