mac os-x上的颜色选择器选择错误的颜色 [英] Color picker on mac os-x selects wrong colors

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

问题描述

我们的设计师给了我一个颜色值:



RGB 217,114,62



打开颜色选择器,切换到rgb并放入rgb值。但颜色预览似乎太暗了。所以我拿着颜色选择器,并在预览窗口中选择颜色。而不是相同的值,它显示RGB 206,93,48。首先我认为某种颜色配置文件会改变颜色。但是用这种更深的颜色重新形成过程不会产生第三个值。它保持206,93,48。然后我猜想它可能是最近的网络安全的颜色,它切换到。但它不在列表中。这里发生了什么?是217,114,62一个魔术值?



我决定做一个带有div的html页面,并将其设置为rgb 217,114,62。
所有罚款:



 < body& < div style =background:rgb(217,114,62); width:300px; height:300px;> RGB 217,114,62< / div> < / body>  



它在预览。精细。我添加了一个矩形,选择它的颜色与颜色选择器。您可以看到正确的颜色。





然后我只需点击HEX字段的指针。自动矩形变暗,但颜色值保持不变。请参阅:



>



当我现在从矩形中选择更深的颜色是...你已经猜到了它... 206,93,48。 WTF!?



我在使用颜色选择器的所有mac程序中都有相同的问题。
我没有线索可以是什么。我试图将显示颜色设置更改为任何。结果相同。 OS-X 10.10.1。

解决方案

你(可能是你的设计师)需要熟悉颜色配置文件。 RGB 217,114,62不能充分指定颜色。你需要知道在哪个颜色配置文件中表达。例如,sRGB与通用RGB。



当您使用颜色选择器中的吸管从屏幕上采样颜色时,您会得到设备颜色配置文件中的值。



屏幕截图中显示RGB的弹出式菜单旁边的齿轮图标会显示您的



我怀疑在十六进制字段中单击可以改变滑块和文本字段显示的值,颜色配置文件转换为sRGB,因为这是网络颜色的颜色配置文件,但根据您想要使用滑块和文本字段来指定该配置文件中的颜色的理论,它不会转换当前值。相反,它在新的配置文件中重新解释它们。对于什么是值得的,你的最后一个屏幕截图显示在我的屏幕上,并用吸管采样显示,外部的颜色接近217,114,62在通用RGB颜色配置文件,而内部颜色接近217,114,62在sRGB颜色配置文件。 / p>

您需要与您的设计师核对,以了解他们在表达颜色的颜色配置文件。如果他们不是颜色配置文件精明,他们可能已表达在他们的个人屏幕的设备配置文件中,这基本上是无用的。此外,如果他们给你的图像文件工作,那些需要有一个嵌入的颜色配置文件,以便你可以确保他们显示(几乎)在屏幕上与他们的相同。 (您也应该使用显示校准器或专用硬件校准显示器的颜色配置文件。)您可以从系统偏好设置>显示器>颜色>校准打开显示校准器。



已经确认,您需要在输入值之前将颜色选择器切换到所需的颜色配置文件。或者从应用程序显示的具有嵌入颜色配置文件的图像文件中进行样本处理,该应用程序会正确处理(预览会做),然后转换为特定的颜色配置文件。如果要在代码中创建颜色,则可以使用通用RGB颜色空间中的值 + [NSColor colorWithCalibratedRed:green:blue:alpha:] 对于sRGB颜色空间中的值,$ c> + [NSColor colorWithSRGBRed:green:blue:alpha:] 。


Our designer gave me a color value:

RGB 217,114,62

In mac image preview I open the color selector, switch to rgb and put in the rgb values. But the color preview seems to be too dark. So I take the color picker and select the color in the preview window. And instead of the same values, it shows RGB 206,93,48. First I thought some sort of color profile would change the colors. But reapeating the procedure with this darker color does not result in a third value. It stays 206,93,48. Then I guessed it might be the nearest web safe color that it switches to. But it's not in the list. What is going on here? Is 217,114,62 a magic value?

I decided to make a html page with a div and styled it to rgb 217,114,62. All fine:

<body>
    <div style="background: rgb(217,114,62);width:300px;height:300px;">RGB 217,114,62</div>    
</body>

Now I made a screen shot and opened it in preview. Fine. I added a rectangle, selected it's color with the color picker. The correct color as you can see.

Then I just click the pointer into the HEX field. Automatically the rectangle darkens but the colour values stay the same. See:

When I now pick the darker color from the rectangle it is... You already guessed it... 206,93,48. WTF!?

I have the same problem in all my mac programs that use the color picker. I have no clue what it can be. I tried changing the display color settings to whatever. Same result. OS-X 10.10.1.

解决方案

You (and possibly your designer) need to familiarize yourself with color profiles. "RGB 217,114,62" does not adequately specify a color. You would need to know in which color profile that was expressed. For example, sRGB vs. Generic RGB.

When you use the eyedropper in the color picker to sample a color from the screen, you get the values in the device color profile. This will be different from a calibrated color profile like sRGB or generic.

The gear icon next to the pop-up menu showing "RGB" in your screenshots both shows you the color profile for the values shown by the sliders and text fields and lets you change the profile (thus converting the values).

I suspect that clicking in the hex field switches the color profile to sRGB because that's the color profile of web colors but, on the theory that you want to use the sliders and text fields to specify a color in that profile, it doesn't convert the current values. Instead, it reinterprets them in the new profile. For what it's worth, your last screenshot as shown on my screen and sampled with the eyedropper shows that the outer color is nearly 217,114,62 in the Generic RGB color profile while the inner color is nearly 217,114,62 in the sRGB color profile.

You need to check with your designer to find out what color profile they are expressing the colors in. If they aren't color-profile-savvy, they may have expressed them in their personal screen's device profile, which is basically useless. Also, if they are giving you image files to work from, those need to have an embedded color profile so that you can be sure they display (nearly) the same on your screen as they do on theirs. (You both should also calibrate your display's color profile using Display Calibrator or dedicated hardware. You can open Display Calibrator from System Preferences > Displays > Color > Calibrate.)

Once you've confirmed that, you need to switch the color picker to the desired color profile before entering values. Or sample from an image file with an embedded color profile as displayed by an app which properly handles that (Preview will do), and then convert to a specific color profile. If you were to create the color in code, you would use +[NSColor colorWithCalibratedRed:green:blue:alpha:] for values in the Generic RGB color space or +[NSColor colorWithSRGBRed:green:blue:alpha:] for values in the sRGB color space.

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

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