Question

I'm trying to make a font the same color as a detail disclosure button (dark purple or dark navy blue).

I used the following combination [UIColor colorWithRed: 187.0/255.0f green:107.0/255.0f blue:207.0/255.0f alpha:1.0] but it is not even close. Can anyone please provide me with the right combination of red green and blue.

Was it helpful?

Solution

For color of the background of a detail disclosure button you'll want something like:

[UIColor colorWithRed: 28./255.f green:86./255.f blue:207./255.f alpha:1.0]

For the font color of a standard UIButton:

[UIColor colorWithRed: 38./255.f green:60./255.f blue:113./255.f alpha:1.0]

OTHER TIPS

Something like this: [UIColor colorWithRed: 0f green:0f blue:0.5f alpha:1.0] should be closer.

If you want other colors, use a color chart like this one on Wikipedia, and just convert the percentages to values between 0 and 1 (e.g. 30% = 0.3)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top