如何通过interfacebuilder使用精确的十六进制设置视图的背景色?

时间:2021-09-01 22:18:13

In IB, when I go to the attributes inspector and click the "background" drop down -> other, I get a color pallet with several tabs (wheel, slider, apllets) but there is no place to set a precise such as #ff5911 for example.

在IB中,当我转到属性检查器并单击“background”下拉->时,我得到了一个带有多个选项卡(*、滑块、apllet)的颜色托盘,但是没有地方可以设置精确值,例如#ff5911。

Is there a way to do that without using code?

有没有一种不用代码就能做到的方法?

3 个解决方案

#1


0  

Add a hex color picker to your system. I use http://wafflesoftware.net/hexpicker/.

向系统中添加一个十六进制颜色选择器。我使用http://wafflesoftware.net/hexpicker/。

#2


13  

In Xcode 6, you can set hex values in the RGB slider tab.

在Xcode 6中,可以在RGB slider选项卡中设置十六进制值。

如何通过interfacebuilder使用精确的十六进制设置视图的背景色?

#3


1  

You can switch to the RGB-Slider and use the RGB value of your hex code. There are several converters in the web: http://www.javascripter.net/faq/hextorgb.htm

您可以切换到RGB- slider并使用十六进制代码的RGB值。web中有几个转换器:http://www.javascript .net/faq/hextorgb.htm

ff5911 => R: 255, G: 89, B: 17

I think there isn't the possibility in the Interace Builder to directly put in the hex value. Another way would be using the "magnifier" symbol and click on the desired color.

我认为Interace构建器不可能直接输入十六进制值。另一种方法是使用“放大镜”符号并单击所需的颜色。

#1


0  

Add a hex color picker to your system. I use http://wafflesoftware.net/hexpicker/.

向系统中添加一个十六进制颜色选择器。我使用http://wafflesoftware.net/hexpicker/。

#2


13  

In Xcode 6, you can set hex values in the RGB slider tab.

在Xcode 6中,可以在RGB slider选项卡中设置十六进制值。

如何通过interfacebuilder使用精确的十六进制设置视图的背景色?

#3


1  

You can switch to the RGB-Slider and use the RGB value of your hex code. There are several converters in the web: http://www.javascripter.net/faq/hextorgb.htm

您可以切换到RGB- slider并使用十六进制代码的RGB值。web中有几个转换器:http://www.javascript .net/faq/hextorgb.htm

ff5911 => R: 255, G: 89, B: 17

I think there isn't the possibility in the Interace Builder to directly put in the hex value. Another way would be using the "magnifier" symbol and click on the desired color.

我认为Interace构建器不可能直接输入十六进制值。另一种方法是使用“放大镜”符号并单击所需的颜色。