各种颜色之间的转换,会陆续更新,
HEX颜色转UIColor
- (UIColor*)ConvertWith:(NSInteger)RGB Alpha:(CGFloat)a { NSInteger r = (RGB & 0xFF0000) >> 16; NSInteger G = (RGB & 0xFF00) >> 8; NSInteger B = (RGB & 0xFF); UIColor * color = [[UIColor alloc]initWithRed:r green:G blue:B alpha:a]; return color; }
时间: 2024-10-14 00:47:22