Interface Builder的颜色选择器中的颜色错误 [英] Wrong color in Interface Builder's color picker

查看:141
本文介绍了Interface Builder的颜色选择器中的颜色错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有棕色图像的UIImageView,它不会总是到达顶部。 UIImage视图位于白色UIView内。

I have an UIImageView with a brown image that will not always reach the top part. The UIImage view is inside a white UIView.

因此,因为图像的上半部分是线性棕色,我说我会在其下方使UIView相同棕色,用户将看不到图像的结束位置。到目前为止,非常好。

So, because the top part of the image is a linear brown color, I said I will make the UIView underneath it the same brown color, and the user will not see where the image ends. So far, so good.

我的问题是,当我选择图像顶部的颜色时,颜色选择器会选择比实际颜色更深的颜色:(

My problem is, when I pick the color in the top part of the image, the color picker picks a more darker color than actually is there :(

在点击颜色选择器之前:

Before I click the color picker:

点击颜色选择器后:

After I click the color picker:

怎么来的?

推荐答案

只是想用一些截图详细说明接受的答案。

Just wanted to elaborate upon the accepted answer with some screenshots.

如果你想匹配Photoshop和Xcode之间的RGB值完全(没有颜色空间之间的转换)然后您需要将图像保存为通用RGB并使用通用RGB颜色空间输入任何滴管值。

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.


  • 当您从Ph​​otoshop中选择Save for Web& Devices时,取消选中转换为sRGB框。


  • 在Xcode中,单击颜色选择器中的颜色空间弹出窗口并选择Generic RGB,然后从Photoshop输入红色,绿色和蓝色值,不是HEX VALUE 因为某种原因会恢复到sRGB颜色空间(注意不要选项卡到十六进制字段,因为这也会将颜色空间更改为sRGB)。

  • In Xcode, click the colorspace popup in the color picker and choose "Generic RGB", then enter the red, green and blue values from Photoshop, NOT THE HEX VALUE as this reverts back to the sRGB colorspace for some reason (be careful not to tab to the hex field either, as that also changes the colorspace to sRGB).

更多信息此处,包括如何匹配屏幕截图。

More info here, including how to match screenshots.

这篇关于Interface Builder的颜色选择器中的颜色错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆