What's the RGB value for UITableViewCellSelectionStyleGray?
Using Pixie
(an application available from Apple's Developer Center under "Downloads For Apple Developers" -> "Graphics Tools For Xcode"), and sampling a UITableViewCell
displaying in the selected
state with a selectionStyle
property set to UITableViewCellSelectionStyleGray
, sRGB values came at 0.85
for red
, green
, and blue
.
Multiplying by 255
(convert to RGB) yields 216.75
for each. Using the "RGB-to-HEX Conversion" tool at http://www.javascripter.net/faq/rgbtohex.htm and inputting 217
yields a hex value of D9D9D9
.
Found a post which fits exactly the UIColor
implemented by Apple for UITableViewCellSelectionStyleGray
:
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.