static func colorWithHexString (hex:String) -> UIColor { let cString:String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString if ((cString as String).characters.count != 6) { return UIColor.grayColor() } let rString = (cString as NSString).substringWithRange(NSRange(location: 0, length: 2)) let gString = (cString as NSString).substringWithRang