4

How do you color pick right RGBA values for UIBarButtonItem tint color so that when default effects are applied you get the results you were expecting?

My designer handed over to me correct RGBA values that I should apply as a tint color to my navigation bar items, but iOS will apply it's effects on bar button items.

You can see this here:

enter image description here

Thank you.

Ali
  • 1,396
  • 14
  • 37

1 Answers1

0

Please follow the steps in the screenshot

enter image description here

EDIT 1: in my case its showing up the exact color which I am setting

enter image description here

EDIT 2: this will show the color for the RGB value as (0,128,198)

enter image description here Hope this helps

Vimal Venugopalan
  • 4,091
  • 3
  • 16
  • 25
  • 1
    Oh, I figure just now that my question sounds like a that silly, you're right. I don't have any problem with "how to" set an UIColor to an UIBarButtonItem, but instead if you set the exact values iOS will apply a default on that button and you will get somewhat different color. – Ali Sep 06 '12 at 12:44
  • What are the RGB values please? – Ali Sep 06 '12 at 12:55
  • 1
    Exactly! Can't you spot the huge difference between the tint color you see in the color picker and what you actually get in a device? – Ali Sep 06 '12 at 13:03
  • you are setting the tintColor.. which is different from the actual backGroundColor property of other controls(e.g. UILabel). If you want specific Colors then you should drawRect instead of using native UIBarButton – Vimal Venugopalan Sep 06 '12 at 14:34
  • 1
    My question is exactly that, I mean how to set the tint color (no drawRect, or whatsoever) and get the color expected? – Ali Sep 06 '12 at 14:43