[globle colorfromhexrgb:@"bb0b15"]
+ (UIColor *)colorFromHexRGB:(NSString *)inColorString
{
UIColor *result = nil;
unsigned int colorCode = 0;
unsigned char redByte, greenByte, blueByte;
if (nil != inColorString)
{
NSScanner *scanner = [nsscanner scannerwithstring:incolorstring];
(void) [scanner scanhexint:&colorcode]; // ignore error
}
redByte = (unsigned char) (colorCode >> 16);
greenByte = (unsigned char) (colorCode >> 8);
blueByte = (unsigned char) (colorCode); // masks off high bits
result = [uicolor
colorwithred: (float)redbyte / 0xff
green: (float)greenbyte/ 0xff
blue: (float)bluebyte / 0xff
alpha:1.0];
return result;
}