2using System.Text.RegularExpressions;
30 uiInputField.onValidateInput = (InputField.OnValidateInput)Delegate.Combine(uiInputField.onValidateInput,
new InputField.OnValidateInput(
OnValidateInput));
36 if (!Regex.IsMatch(addedChar.ToString(),
"[A-Fa-f0-9]"))
64 currentHex =
string.Concat(value[0], value[0], value[1], value[1], value[2], value[2],
GetAlpha(
"FF"));
67 currentHex =
string.Concat(value[0], value[0], value[1], value[1], value[2], value[2],
GetAlpha(
string.Concat(value[3], value[3])));
91 if (Input.GetKeyDown(KeyCode.Escape))
106 if (!
input.isFocused)
static Color HexToColor(string hex)
static string ColorToHex(Color32 color)