【问题标题】:What's the RGB value for UITableViewCellSelectionStyleGray?UITableViewCellSelectionStyleGray 的 RGB 值是多少?
【发布时间】:2020-01-09 09:07:46
【问题描述】:

UITableViewCellSelectionStyleGray 的 RGB 值是多少? HEX 值也很受欢迎。

【问题讨论】:

  • Apple 提供 DigitalColor 色度计来从您的屏幕上挑选颜色。应用程序 -> 其他 -> DigitalColor。

标签: ios objective-c uitableview uicolor


【解决方案1】:

使用Pixie(Apple 开发人员中心“Downloads For Apple Developers”->“Graphics Tools For Xcode”下的一个应用程序),并以selected 状态显示UITableViewCellselectionStyle属性设置为UITableViewCellSelectionStyleGray,对于redgreenblue,sRGB 值位于0.85

乘以255(转换为RGB)得到216.75。在http://www.javascripter.net/faq/rgbtohex.htm 使用“RGB 到十六进制转换”工具并输入217 会产生一个十六进制值D9D9D9

【讨论】:

    【解决方案2】:

    找到了一个完全符合 Apple 为 UITableViewCellSelectionStyleGray 实施的 UIColor 的帖子:

    UIColor* selectedColor = [UIColor colorWithRed:217.0/255.0 
                                             green:217.0/255.0 
                                              blue:217.0/255.0 alpha:1.0];
    

    Original post can be found here.

    【讨论】:

      猜你喜欢
      • 2015-03-28
      • 2021-08-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-01
      • 2016-12-15
      • 2021-11-23
      相关资源
      最近更新 更多