16进制转UIColor

#define UIColorFromRGBA(rgbValue, alphaValue) \

[UIColor \

colorWithRed:((float)((rgbValue &0xFF0000) >>16))/255.0\

green:((float)((rgbValue &0x00FF00) >>8))/255.0\

blue:((float)(rgbValue &0x0000FF))/255.0\

alpha:alphaValue]

2.随时随地使用

UICorlor *color =UIColorFromRGBA(0xFF0000,.75);

你可能感兴趣的:(16进制转UIColor)