コード例 #1
0
        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());
        }
コード例 #2
0
 private void SelectColorBtn_Click(object sender, EventArgs e)
 {
     colorDialog.ShowDialog();
     colorInputBox.Text = ColorUtil.ColorToHex(colorDialog.Color);
 }