简体   繁体   English

匹配iOS的色彩空间

[英]Colour space matching iOS

I have a purple color from a design that has a hex value of #ae359f. 我的设计有紫色,十六进制值为#ae359f。

I convert this hex into a UIColor, load it on the simulator and take a screenshot. 我将此十六进制转换为UIColor,将其加载到模拟器上并截图。

I open both the design and the screenshot in photoshop, and use the eyedropper and they both have the same hex value of #ae359f, however, they are visibly different colours. 我在photoshop中同时打开了设计和屏幕截图,并使用了吸管,它们的十六进制值均为#ae359f,但是它们的颜色明显不同。

Must be a colorspace issue - which I've read about a few times and still don't really get it. 必须是色彩空间问题-我已经阅读了好几次,但仍然没有真正理解它。 If its on the same device why the f can't #ae359f be the same everywhere! 如果在同一设备上,为什么#ae359f的f到处都不能相同! Who's fault is this. 这是谁的错。

So, the question is... how can i make UIColor look like AdobeRGB values - i can do it in interface builder I think... 所以,问题是...我怎样才能使UIColor看起来像AdobeRGB值-我可以在我认为的界面生成器中做到这一点...

Color Management is not supported on iOS in this graphics stack. 此图形堆栈中的iOS不支持颜色管理。 Quartz et al will treat your colors as sRGB. Quartz等会将您的颜色视为sRGB。

You could introduce a conversion routine for AdobeRGB -> sRGB, but the easy way is to just provide colors in sRGB values. 可以引入AdobeRGB-> sRGB的转换例程,但简单的方法是仅以sRGB值提供颜色。


There's a little disclaimer at the end of the reference . 参考文献末尾有一些免责声明。

COLOR SPACES AND IOS 颜色空间和iOS

iOS does not support ColorSync, so all assets should be provided in the native device color space: sRGB. iOS不支持ColorSync,因此应在本机设备颜色空间中提供所有资产:sRGB。

More info in this Tech Note: https://developer.apple.com/library/ios/technotes/tn2313/_index.html 此技术说明中的更多信息: https : //developer.apple.com/library/ios/technotes/tn2313/_index.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM