Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view a color code in the Xcode xib editor?

Tags:

xcode

I've been using a color that I chose with a color picker in Xcode. I need to use that color programmatically now, but I don't know its hex code.

Is there a way to see it in Xcode?

I'm using Xcode 4.2.

like image 554
Louis Waweru Avatar asked Nov 01 '11 13:11

Louis Waweru


3 Answers

As of Xcode 6, users can view both RGB, CMYK, HSB and the Hex value as shown below. (No need for conversion)

enter image description here

like image 144
4aRk Kn1gh7 Avatar answered Nov 11 '22 17:11

4aRk Kn1gh7


Assuming you are talking about picking color in xcode interface builder, the answer can be obtained in 2 steps:

Step 1: Get RGB values by following this link.

Step 2: Convert that to hex code by following this link

like image 26
Saran Avatar answered Nov 11 '22 16:11

Saran


write this in .m file

1.NSLog(@"color is %@",picker.color);

like image 45
Tendulkar Avatar answered Nov 11 '22 18:11

Tendulkar