Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-03-2008, 08:27 PM   #1 (permalink)
Registered Member
 
Join Date: Jul 2008
Posts: 69
Default RGB of Color

This is more of a IB question. In IB have have used the color dialog to pick a color for the background of my view. Now I want to create some HTML content that uses the same color. In the IB I figured I could see the RBG values for the color. But I can't seem to find that. Alternatively, how can I take the backGround color of the view and print out the RGB values?

-Darrell
__________________
Akamojo Software
Akamojo is offline   Reply With Quote
Old 09-03-2008, 09:14 PM   #2 (permalink)
New Member
 
Join Date: May 2008
Posts: 49
Default

I don't know the answer to your question directly, since I have completely failed to master Interface Builder - it's been much easier for me to create my interface elements in code.

If I want to match a UIColor like [ UIColor redColor ] to a HTML color, I'll do this:

- Take a screen shot of my application, showing the color.

- Pull up Grab or your favourite screen capture utility. (There's one built into the OS that doesn't need grab, but I can never remember the cryptic key sequence needed to run it).

- Make the screen capture and Edit/Copy it

- Paste it into Photoshop or your favourite image editor.

- Use the eyedropper tool to pick the color.

- Pull up the color picker. In Photoshop, you will see the hex color on the lower corner of the picker, right next to the color well.

I know it's a bit eccentric but it does work. I think you can use Photoshop Elements if you can't afford Photoshop

Hope that helps.

D

Hope that helps.

D
David H Dennis is offline   Reply With Quote
Old 09-03-2008, 09:20 PM   #3 (permalink)
Registered Member
 
mosttornbrain's Avatar
 
Join Date: Sep 2008
Location: Woonsocket, RI
Age: 44
Posts: 42
Default

Just use DigitalColor Meter (found the Utilities directory on your Mac). No need to take a screen shot - just start it up and hover over the color you need to know the hex values for.
mosttornbrain is offline   Reply With Quote
Old 09-03-2008, 09:37 PM   #4 (permalink)
Registered Member
 
Join Date: Jul 2008
Posts: 69
Default

Thanks! Turned out to not even be a IB question but a Mac question I guess.
__________________
Akamojo Software
Akamojo is offline   Reply With Quote
Old 09-13-2008, 10:36 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2008
Posts: 27
Send a message via AIM to superuser
Default

In case anyone was looking for how to set a UIColor to an RBG value (like I was), it is done like this:

Use DigitalColor Meter in your utilities folder and get the RGB as Percentage value of the color on your screen then use the values as decimals like this:

self.backgroundColor = [UIColor colorWithRed:.914 green:.855 blue:.733 alpha:1];
superuser is offline   Reply With Quote
Old 04-17-2009, 02:46 PM   #6 (permalink)
New Member
 
Join Date: Apr 2009
Posts: 68
Default

Cool thread learned two new items here, thanks!
savemeanegg is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 158,557
Threads: 89,123
Posts: 380,243
Top Poster: BrianSlick (7,102)
Welcome to our newest member, wTaylorDaviesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:49 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0