示例#1
0
        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);
        }
示例#2
0
 static bool ValidColor(char c)
 {
     return(Colors.IsStandard(c) || Colors.IsDefined(c));
 }