gpt4 book ai didi

swift - 为什么如果我为导航 Controller 栏设置颜色,它看起来与 Photoshop 或任何应用程序不同?

转载 作者:行者123 更新时间:2023-11-30 10:12:36 24 4
gpt4 key购买 nike

很简单。我使用这种颜色:#00ac00 和 RGB (0,172,0)。例如,在 Photoshop 中,颜色正是我所需要的。但当我在 Xcode 中对其进行编程后,它看起来更加明亮,就像迷幻一样。这是我设置颜色的代码:

navigationController!.navigationBar.barTintColor = UIColor(red: 0, green: 172, blue: 0, alpha: 0)

我唯一能做的就是设置一个图案图像...

最佳答案

调出“颜色”对话框,然后单击“ slider ”选项卡,然后选择通用 RGB。 ' 请注意不要在 slider 选项之间切换,因为这会将其转换回 sRGB 值。

另一个选项是取消选中 Photoshop 中的“转换为 sRGB”选项。当您从 Photoshop 中选择“保存为网络和设备”时,取消选中“转换为 sRGB”框。

为什么会发生这种情况,因为苹果将显示器的值与 RGB 值一起存储。这会导致 Photoshop 色彩校正机制(色彩空间)出现问题。

Source 1

Understanding Color Spaces

Apple Built in Color Mechanism vs Photoshop Built in Color Mechanism

关于swift - 为什么如果我为导航 Controller 栏设置颜色,它看起来与 Photoshop 或任何应用程序不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32166230/

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