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

        return true
    }
    
    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 {
            return false
        }
        

    case radialGradient(Float, Float, Float, [GradientColorElement], Bool)
    case auto, red, blue, green, yellow, transparent
    
    /// 用来校验 rgb 或者 rgba 是否符合 Echarts 颜色的限制
    ///
    /// - Parameters:
    ///   - red: 红色的数值
    ///   - green: 绿色的数值
    ///   - blue: 蓝色的数值
    ///   - alpha: 透明度的数值
    /// - Returns: 如果校验成功则返回 true , 反之返回 false
    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")
