【发布时间】:2020-01-09 09:07:46
【问题描述】:
UITableViewCellSelectionStyleGray 的 RGB 值是多少? HEX 值也很受欢迎。
【问题讨论】:
-
Apple 提供 DigitalColor 色度计来从您的屏幕上挑选颜色。应用程序 -> 其他 -> DigitalColor。
标签: ios objective-c uitableview uicolor
UITableViewCellSelectionStyleGray 的 RGB 值是多少? HEX 值也很受欢迎。
【问题讨论】:
标签: ios objective-c uitableview uicolor
使用Pixie(Apple 开发人员中心“Downloads For Apple Developers”->“Graphics Tools For Xcode”下的一个应用程序),并以selected 状态显示UITableViewCell 和selectionStyle属性设置为UITableViewCellSelectionStyleGray,对于red、green 和blue,sRGB 值位于0.85。
乘以255(转换为RGB)得到216.75。在http://www.javascripter.net/faq/rgbtohex.htm 使用“RGB 到十六进制转换”工具并输入217 会产生一个十六进制值D9D9D9。
【讨论】:
找到了一个完全符合 Apple 为 UITableViewCellSelectionStyleGray 实施的 UIColor 的帖子:
UIColor* selectedColor = [UIColor colorWithRed:217.0/255.0
green:217.0/255.0
blue:217.0/255.0 alpha:1.0];
【讨论】: