Main/Utility/UIHelper.cs
@@ -372,7 +372,7 @@
    public static readonly Color s_NavyYellow = new Color32(242, 238, 2, 255); //f2ee02
    public static readonly Color s_LightGreen = new Color32(42, 227, 55, 255);//2ae337
    public static readonly Color s_LightWhite = new Color32(245, 246, 230, 255); //f5f6e6
    public static readonly Color s_Gray = new Color32(104, 104, 104,255);  //bbbbbb
    public static readonly Color s_Gray = new Color32(187, 187, 187, 255); //bbbbbb
    public static readonly Color s_Gold = new Color32(255, 239, 71, 255);//ffef47
    public static readonly Color s_EarthYellow = new Color32(248, 152, 59, 255);//f8983b
@@ -761,6 +761,30 @@
        return msg;
    }
    public static string AppendColor(Color color, string msg)
    {
        return StringUtility.Contact("<color=#", ColorToHexWithHash(color), ">", msg, "</color>");
    }
    public static string ColorToHexWithHash(Color color, bool includeAlpha = false)
    {
        int r = Mathf.RoundToInt(color.r * 255);
        int g = Mathf.RoundToInt(color.g * 255);
        int b = Mathf.RoundToInt(color.b * 255);
        if (includeAlpha)
        {
            int a = Mathf.RoundToInt(color.a * 255);
            return string.Format("{0:X2}{1:X2}{2:X2}{3:X2}", r, g, b, a);
        }
        else
        {
            return string.Format("{0:X2}{1:X2}{2:X2}", r, g, b);
        }
    }
    //needName 指官职0是否需要名称
    public static string GetRealmName(int realmLv, bool bright = true, bool needName = false)
    {
@@ -825,7 +849,7 @@
    /// <param name="itemColor"></param>
    /// <param name="msg"></param>
    /// <param name="bright"></param>
    /// <param name="colorGroupType"></param>
    /// <param name="colorGroupType">0 通用功能品质分组精良到神话</param>
    /// <returns></returns>
    public static string AppendColor(int itemColor, string msg, bool bright = true, int colorGroupType = 0)
    {