How do I enter RGB values into Interface Builder?
How can I enter RGB or Hex color values for backgrounds in Interface Builder? I can select predefined colors but I would like to manually enter in RGB values. Where can I do this?
Click on the color slider icon, and then choose "RGB Sliders" from the drop-down list.
You can also use the magnifying-glass as a color picker to pick up an exact color from anywhere on the screen; also see @ken's excellent comment below clarifying how colorspaces work with the magnifying glass.
Although Tyler's response answers the question, you may encounter issues using the picker because it uses the display's colorspace (as clarified by Ken).
If you want to match RGB values between Photoshop and Xcode exactly (without conversion between colorspaces) then you need to save your images in generic RGB and enter any dropper values using the generic RGB colorspace.
More info here, including how to match screenshots.
It sounds like you're unfamiliar with the Mac OS X color panel. Click the tabs along the top of the color panel window to choose other pickers. Pickers are also plugins, so it's possible to add new UI for color selection. See, for example, developer color picker.
链接地址: http://www.djcxy.com/p/24400.html上一篇: 加载的笔尖,但'视图'出口没有设置
下一篇: 如何在界面生成器中输入RGB值?