What is the default color for navigation bar buttons on the iPhone?

萝らか妹 提交于 2019-12-02 21:10:17
ceperry

After a while, I realized that the iPhone was applying a blue gradient to the button, so the tint needed to be pretty gray. I finally hit on this HSV combination which is pretty darn perfect. Note that as per the documentation, all values are specified as float values between 0 and 1.

Hue: 0.6

Saturation: 0.33

Value: 0.69

Alpha: 0

I hope this saves a couple hours of work for some other developer.

Igor

I use this one:

[UIColor colorWithHue:0.6 saturation:0.33 brightness: 0.65 alpha:1.0];

Set the tint color like so:

self.navigationController.navigationBar.tintColor = nil

It will give you the default color and the gradient shade as well.

Teach someone to fish.

Check your System for an App called Digital Color Meter or something like that. You can use this to get RGB values from colors on screen.

Jason Sultana

To save some more time, the RGB value for that is:

RGB(118, 141, 176).

If you want to recreate the colour for the 'down' state of the button bar, the RGB value is:

RGB(0, 23, 73).

The gradient I'm not sure about, but this is the base colour.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!