gpt4 book ai didi

iOS10 UIColor 变化

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:11:57 27 4
gpt4 key购买 nike

在 Apple developer Document 中,我在 UIColor 中发现了一些新东西。

If your app was linked on or after iOS 10 and when running on iOS 10 or later, colors are created in extended color spaces:

kCGColorSpaceExtendedGray

kCGColorSpaceExtendedSRGB

When working in an extended color space, color values are not clamped to fit inside the color gamut, meaning that component values may be less than 0.0 or greater than 1.0. When displayed on an sRGB display, such colors are outside the gamut and will not be rendered accurately. However, extended color spaces are useful working color spaces when you want a pixel format and representation that other color spaces can be easily converted into. For example, a color in the display P3 color space that is not within the sRGB color gamut can still be converted to an extended sRGB format. Some of its values will be outside of the 0.0 to 1.0 range. However, when displayed on a device with a P3 display gamut, it would still be rendered correctly.

To summarize, when you need to worry about color spaces, use these extended color spaces as working color spacs. When you need to worry about representing that color as closely as possible in a specific color space, convert the color from the extended color space into the target color space.

我只是无法理解,当我想在 Xcode8 中调试某些 View 的背景时,调试区域显示 UIExtendedGrayColorSpace 0 0。那是什么颜色?

最佳答案

我不是 100% 确定,但从我所看到的...

UIExtendedGrayColorSpace 0 0 是“清晰的”和UIExtendedGrayColorSpace 1 1 是白色的。

关于iOS10 UIColor 变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39555732/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com