         return true
     }
     
+    /// 用来校验 hexString 是否符合 ECharts 16进制字符串颜色的限制
+    ///
+    /// - Note: 只有以 '#' 开头，并且后面跟三位或者六位十六进制字符串才可以
+    ///
+    /// - Parameter hexString: 需要校验的16进制颜色字符串
+    /// - returns: 如果校验成功则返回 true , 反之返回 false
     internal static func validate(hexString: String) -> Bool {
         var cString:String = hexString.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet() as NSCharacterSet).uppercaseString
         
-        if (cString.hasPrefix("#")) {
-            cString = cString.substringFromIndex(cString.startIndex.advancedBy(1))
-        }
-        
-        guard cString.characters.count == 6 || cString.characters.count == 3 || cString.characters.count == 8 || cString.characters.count == 4 else {
+        guard cString.hasPrefix("#") else {
+            return false
+        }
+        
+        cString = cString.substringFromIndex(cString.startIndex.advancedBy(1))
+        
+        guard cString.characters.count == 6 || cString.characters.count == 3 else {
             return false
         }
         

    case radialGradient(Float, Float, Float, [GradientColorElement], Bool)
    case auto, red, blue, green, yellow, transparent
    
    internal static func validate(red: Int, _ green: Int, _ blue: Int, _ alpha: Float = 1.0) -> Bool {
        guard red >= 0 && red <= 255 else {
            printError("Please check the red element")

///
/// - rgba: 以RGBA形式创建的颜色
/// - rgb: 以RGB形式创建的颜色
/// - hexColor: 以16进制字符串创建的颜色， 并且只能为以 '#' 开头 3位16进制数或者6位16进制数
public enum Color: Jsonable {
    
    public enum ImageRepeat: String, Jsonable {
