public static string GetRarityColoredText(int rarity, string str, [Optional, DefaultParameterValue(1f)] float alpha) { StringBuilder builder = new StringBuilder(); builder.Append("<color=#"); Color color = ConfigUi.RARITY_TEXT_COLORS[rarity]; color.a = alpha; builder.Append(ColorUtil.ColorToHex(color)); builder.Append(">"); builder.Append(str); builder.Append("</color>"); return(builder.ToString()); }
private void SelectColorBtn_Click(object sender, EventArgs e) { colorDialog.ShowDialog(); colorInputBox.Text = ColorUtil.ColorToHex(colorDialog.Color); }