//
通过
Red,Greed,Blue
设置颜色值
#define UIColorWithRGBA(r,g,b,a) [UIColor colorWithRed:(r)/ 255.0f green:(g)/ 255.0f blue:(b)/ 255.0f alpha:(a)]
#define UIColorWithRGB(r,g,b) UIColorWithRGBA(r,g,b, 1.0 )
// 通过 16 进制设置颜色值
#define UIColorWithHexA(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000 ) >> 16 ))/ 255.0 \
green:((float)((rgbValue & 0xFF00 ) >> 8 ))/ 255.0 \
blue:((float)(rgbValue & 0xFF ))/ 255.0 \
alpha:(a)]
#define UIColorWithRGBA(r,g,b,a) [UIColor colorWithRed:(r)/ 255.0f green:(g)/ 255.0f blue:(b)/ 255.0f alpha:(a)]
#define UIColorWithRGB(r,g,b) UIColorWithRGBA(r,g,b, 1.0 )
// 通过 16 进制设置颜色值
#define UIColorWithHexA(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000 ) >> 16 ))/ 255.0 \
green:((float)((rgbValue & 0xFF00 ) >> 8 ))/ 255.0 \
blue:((float)(rgbValue & 0xFF ))/ 255.0 \
alpha:(a)]
#define UIColorWithHex(rgbValue) UIColorWithHexA(rgbValue,
1.0
)