Home >Web Front-end >HTML Tutorial >object-c converts RGB colors into hexadecimal HTML colors_html/css_WEB-ITnose
-(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);}