常用的颜色宏定义

// 获得当前的版本

#define iOS(version) ([UIDevice currentDevice].systemVersion.doubleValue >= (version))

#define ColorA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)/255.0]

#define Color(r, g, b) ColorA((r), (g), (b), 255)

#define RandomColor Color(arc4random_uniform(255), arc4random_uniform(255), arc4random_uniform(255))

原文地址:https://www.cnblogs.com/1018475062qq/p/6256826.html