-(void)color:(NSString *) red andGreen:(NSString*) green andBule:(NSString*) bule{
NSInteger Red = [red integerValue];
NSInteger Green = [green integerValue];
NSInteger Bule = [bule integerValue];
NSInteger colorsize = Red<<16 | Green << 8 | Bule;
NSString * Color = [NSString stringWithFormat:@"#%06lx",colorsize];
NSLog(@"%li",(long)colorsize);
NSLog(@"Color = %@",Color);
}
object-c将RGB颜色转换成16进制HTML颜色
最新推荐文章于 2021-06-17 20:29:12 发布