+ (UIColor *)hexColor:(NSString *)color{
NSString *hexColor = color;
if ([color characterAtIndex:0] == '#') {
hexColor = [hexColor substringFromIndex:1];
}
NSString *rc = [hexColor substringWithRange:NSMakeRange(0, 2)];
long r = strtol([rc UTF8String], NULL, 16);
NSString *gc = [hexColor substringWithRange:NSMakeRange(2, 2)];
long g = strtol([gc UTF8String], NULL, 16);
NSString *bc = [hexColor substringWithRange:NSMakeRange(4, 2)];
long b = strtol([bc UTF8String], NULL, 16);
return [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1];
}