public static bool IsValidHex(string hex) { if (hex.Length != 6) { return(false); } for (int i = 0; i < hex.Length; i++) { if (!Colors.IsStandard(hex[i])) { return(false); } } return(true); }
static bool ValidColor(char c) { return(Colors.IsStandard(c) || Colors.IsDefined(c)); }