Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the RGB value for UITableViewCellSelectionStyleGray?

What's the RGB value for UITableViewCellSelectionStyleGray ? HEX value is appreciated as well.

like image 531
Blazej SLEBODA Avatar asked Dec 04 '14 13:12

Blazej SLEBODA


2 Answers

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.

like image 187
Evan R Avatar answered Oct 12 '22 20:10

Evan R


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.

like image 26
Alex Cio Avatar answered Oct 12 '22 20:10

Alex Cio