-(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); }
原文地址:http://blog.csdn.net/xiaopeng12300/article/details/44157377