Beispiel #1
0
        void OnEndEdit(string newHex)
        {
            Color32 color;

            if (ColorHelper.Hex2Color(newHex, out color))
            {
                Picker.CurrentColor = color;
            }
            else
            {
                Debug.LogError("Hex value is in the wrong format, valid formats are: #RGB, #RGBA, #RRGGBB and #RRGGBBAA (# is optional).");
                inputFiled.text = ColorHelper.Color2Hex(Picker.CurrentColor);
            }
        }
Beispiel #2
0
 public override void OnColorChanged()
 {
     inputFiled.text = ColorHelper.Color2Hex(Picker.CurrentColor, DisplayAlpha);
 }