- 最后登录
- 2021-7-6
- 注册时间
- 2012-12-27
- 阅读权限
- 90
- 积分
- 76145
 
- 纳金币
- 53520
- 精华
- 316
|
rgb = "FFFFFF";
var result = Regex.Matches(rgb, @"\w{2}");
List<string> re = new List<string>();
foreach (Match item in result)
{
re.Add(item.Value);
}
byte r = (byte)Convert.ToByte(re[0], 16);
byte g = (byte)Convert.ToByte(re[1], 16);
byte b = (byte)Convert.ToByte(re[2], 16);
Color32 color = new Color32(r, g, b, 255);
|
|