首页 > 代码库 > IOS::HEX色值的设置

IOS::HEX色值的设置

//16进制色值转换

#define UIColorFromHex(hex) [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16))/255.0 green:((float)((hex & 0xFF00) >> 8))/255.0 blue:((float)(hex & 0xFF))/255.0 alpha:1.0]

 

//代码的如下

 

 qiResultsLab.textColor = UIColorFromHex(0xFF7777);

 

IOS::HEX色值的设置