Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: Cant find rgb color picker for controls

Using Xcode 4.3.2 I am unable to add color values by rgb. The standard picker looks like this enter image description here

Which does not offer any input for rgb or have any sliders allowing me to set anything else.

The custom picker at this location http://www.panic.com/~wade/picker/ instructs me to install at

/home/Library/ColorPickers.

However home is not editable. So I placed it into

/Users/username/Library/ColorPickers

which does nothing. (Is this correct?) Can anyone explain how to properly install this? Thanks

like image 615
jayvatar Avatar asked Aug 13 '12 21:08

jayvatar


2 Answers

I use this tool and it works fine, /home is referring to /Users/Username so you did place it in the right folder.

If the tool still isn't working then you will need to restart Xcode and possibly even the computer.

After that you simply open the standard picker in Xcode, it isn't replaced, a new tab is added to it.

enter image description here

Additionally, you can always manually specify RGB values in code, for example:

[myLabel setTextColor:[UIColor colorWithRed:235.2/255 green:150.7/255 blue:35.1/255 alpha:1.0]];

The values are x/255 because UIColor expects a float value between 0 and 1 and this is an easy way to convert the standard RGB 255 values down to 0-1.

like image 108
Mick MacCallum Avatar answered Oct 26 '22 21:10

Mick MacCallum


I had the same problem, and it's simply that your Toolbar is not showing. Go to View->ShowTool bar and you should now see a tab bar of color picker options. For more information on installing custom color pickers, visit https://developer.apple.com/library/mac/documentation/cocoa/conceptual/DrawColor/Tasks/AddingColorPickers.html

like image 32
Jeff Schmitz Avatar answered Oct 26 '22 22:10

Jeff Schmitz