The correct method to convert the hexadecimal color value to UnityColor solves the problem of displaying pure white
preface
reason
code
//16 bit color to UnityColor color public Color GetColor(string color) { if (color. Length == 0) { Return Color. black;//Set to black } else { //#Ff8c3 removal# color = color.Substring(1); int v = int.Parse(color, System.Globalization.NumberStyles.HexNumber); //Convert Color return new Color( //Int>>Shift to low order //&Bit by bit and de high bit ((float)(((v >> 16) & 255))) / 255, ((float)((v >> 8) & 255)) / 255, ((float)((v >> 0) & 255)) / 255 ); } }
Postscript
References
Comment
Comment area
0F Alas, the term "16 bit color" is a bit inaccurate. It should be "hexadecimal". At first sight, I didn't understand why there are 16 colors, and I thought for a long time why only the first two middle and last two haha. 0F Stupid bunny Stupid bunny Stupid bunny, repeat important things three times 0F Stupid rabbit Stupid rabbit Stupid rabbit Stupid rabbit Stupid rabbit, repeat important things six times 0F Wow, the advertisement is so crazy. There are articles in front of the article, windows at the top, documents at the end and