Home > Web Front-end > HTML Tutorial > object-c converts RGB colors into hexadecimal HTML colors_html/css_WEB-ITnose

object-c converts RGB colors into hexadecimal HTML colors_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:48:35
Original
1412 people have browsed it

-(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);}
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template