| | |
| | | public static readonly Color s_DarkPurpleColor = new Color32(236, 75, 246, 255); |
| | | public static readonly Color s_DarkBlueColor = new Color32(49, 206, 251, 255);//31cefb |
| | | public static readonly Color s_DarkOrangeColor = new Color32(248, 152, 59, 255); |
| | | public static readonly Color s_DarkWhiteColor = new Color32(247, 247, 247, 255); |
| | | public static readonly Color s_DarkWhiteColor = new Color32(255, 255, 255, 255); //ffffff |
| | | public static readonly Color s_DarkGreenColor = new Color32(42, 227, 55, 255);//2ae337 |
| | | |
| | | public static readonly Color s_NavyBrown = new Color32(110, 76, 49, 255);//6e4c31 |
| | |
| | | public static readonly Color s_NavyYellow = new Color32(255, 239, 71, 255); |
| | | 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(204, 204, 204, 255); |
| | | 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 |
| | | |
| | |
| | | switch (itemColor) |
| | | { |
| | | case 0: |
| | | return GetUIColor(TextColType.White, bright); |
| | | return GetUIColor(TextColType.Gray, bright); |
| | | case 1: |
| | | return GetUIColor(TextColType.White, bright); |
| | | case 2: |
| | | return GetUIColor(TextColType.Blue, bright); |
| | | return GetUIColor(TextColType.itemjingliang, bright); |
| | | case 3: |
| | | return GetUIColor(TextColType.Purple, bright); |
| | | return GetUIColor(TextColType.itemxiyou, bright); |
| | | case 4: |
| | | return GetUIColor(TextColType.Orange, bright); |
| | | return GetUIColor(TextColType.itemshishi, bright); |
| | | case 5: |
| | | return GetUIColor(TextColType.Red, bright); |
| | | return GetUIColor(TextColType.itemchuanqi, bright); |
| | | case 6: |
| | | return GetUIColor(TextColType.itemshenhua, bright); |
| | | case 7: |
| | | return GetUIColor(TextColType.itemwuxia, bright); |
| | | case 8: |
| | | return GetUIColor(TextColType.Pink, bright); |
| | | return GetUIColor(TextColType.itemanjin, bright); |
| | | case 9: |
| | | return GetUIColor(TextColType.Green, bright); |
| | | return GetUIColor(TextColType.itemjueyi, bright); |
| | | case 10: |
| | | return GetUIColor(TextColType.itemyuanzu, bright); |
| | | case 11: |
| | | return GetUIColor(TextColType.itembuxiu, bright); |
| | | case 12: |
| | | return GetUIColor(TextColType.itemyonghen, bright); |
| | | |
| | | |
| | | } |
| | | return GetUIColor(TextColType.White, bright); |
| | | } |
| | |
| | | return s_LightWhite; |
| | | case TextColType.Gray: |
| | | return s_Gray; |
| | | case TextColType.itemjingliang: |
| | | // 729de4 精良 |
| | | return new Color32(114, 157, 228, 255); |
| | | case TextColType.itemxiyou: |
| | | // c87bfa稀有 |
| | | return new Color32(199, 123, 253, 255); |
| | | case TextColType.itemshishi: |
| | | // f6de56 史诗 |
| | | return new Color32(246, 222, 86, 255); |
| | | case TextColType.itemchuanqi: |
| | | // fe8534 传奇 |
| | | return new Color32(254, 133, 52, 255); |
| | | case TextColType.itemshenhua: |
| | | // fe4a47 神话 |
| | | return new Color32(254, 66, 71, 255); |
| | | case TextColType.itemwuxia: |
| | | // eb5ce9 无瑕 |
| | | return new Color32(235, 90, 233, 255); |
| | | case TextColType.itemanjin: |
| | | // f9e29f 暗金 |
| | | return new Color32(254, 181, 68, 255); |
| | | case TextColType.itemjueyi: |
| | | // cdfef2 绝艺 |
| | | return new Color32(205, 239, 242, 255); |
| | | case TextColType.itemyuanzu: |
| | | // dfbbed 元祖 |
| | | return new Color32(223, 187, 237, 255); |
| | | case TextColType.itembuxiu: |
| | | // 5eeff2 不朽 |
| | | return new Color32(94, 239, 242, 255); |
| | | case TextColType.itemyonghen: |
| | | // f5b4ea 永恒 |
| | | return new Color32(245, 180, 234, 255); |
| | | } |
| | | return bright ? s_BrightWhiteColor : s_DarkWhiteColor; |
| | | } |
| | | |
| | | |
| | | //描边颜色,对应品质 |
| | | public static Color GetUIOutlineColor(QualityTextColType type) |
| | | { |
| | | switch (type) |
| | | { |
| | | case QualityTextColType.itemcucao: |
| | | // 2d2d2d 粗糙 |
| | | return new Color32(45, 45, 45, 255); |
| | | case QualityTextColType.itemputong: |
| | | // 424242 普通 |
| | | return new Color32(66, 66, 66, 255); |
| | | case QualityTextColType.itemjingliang: |
| | | // 172543 精良 |
| | | return new Color32(23, 37, 67, 255); |
| | | case QualityTextColType.itemxiyou: |
| | | // 2a0f30 稀有 |
| | | return new Color32(42, 15, 48, 255); |
| | | case QualityTextColType.itemshishi: |
| | | // 4a2f00 史诗 |
| | | return new Color32(74, 47, 0, 255); |
| | | case QualityTextColType.itemchuanqi: |
| | | // 451800 传奇 |
| | | return new Color32(69, 24, 0, 255); |
| | | case QualityTextColType.itemshenhua: |
| | | // 510000 神话 |
| | | return new Color32(81, 0, 0, 255); |
| | | case QualityTextColType.itemwuxia: |
| | | // 43003e 无瑕 |
| | | return new Color32(67, 0, 62, 255); |
| | | case QualityTextColType.itemanjin: |
| | | // 6f4401 暗金 |
| | | return new Color32(111, 68, 1, 255); |
| | | case QualityTextColType.itemjueyi: |
| | | // 203995 绝艺 |
| | | return new Color32(32, 57, 149, 255); |
| | | case QualityTextColType.itemyuanzu: |
| | | // 461f5d 元祖 |
| | | return new Color32(70, 31, 93, 255); |
| | | case QualityTextColType.itembuxiu: |
| | | // 2e3975 不朽 |
| | | return new Color32(46, 57, 117, 255); |
| | | case QualityTextColType.itemyonghen: |
| | | // 5d1d52 永恒 |
| | | return new Color32(93, 29, 82, 255); |
| | | } |
| | | return new Color32(0, 0, 0, 255); |
| | | } |
| | | |
| | | private static Regex m_TextColorRegex = new Regex("<color=#[0-9a-zA-Z]+>(.*)</color>", RegexOptions.Singleline); |
| | |
| | | return msg; |
| | | } |
| | | |
| | | // public static int GetItemColor(int _id, Dictionary<int, List<int>> _dict = null) |
| | | // { |
| | | // int _itemColor = 0; |
| | | // var _itemCfg = ItemConfig.Get(_id); |
| | | // if (_itemCfg != null) |
| | | // { |
| | | // _itemColor = _itemCfg.ItemColor; |
| | | // if (_itemCfg.Type == 113 && _dict != null) |
| | | // { |
| | | // _itemColor = ItemLogicUtility.Instance.GetItemQuality(_itemCfg.ID, _dict); |
| | | // } |
| | | // } |
| | | // return _itemColor; |
| | | // } |
| | | |
| | | |
| | | public static Color GetPropertyColor(int property) |
| | | { |