SVG资产在iOS应用中指定XCode中的Colorspace
我目前正在我的iOS应用中使用SVG资产。资产已设计为使用显示P3彩色空间。当资产加载并以SwiftUI图像显示时,它们似乎是在使用SRGB颜色空间而不是P3。
我看不到一种指定在资产目录中使用的颜色空间的方法,也看不到图像上的任何功能来指定此功能。有没有办法做到这一点,还是我需要返回使用PNG?
I am currently using SVG assets in my iOS app. The assets have been designed to use the Display P3 color space. When the assets are loaded and displayed in a SwiftUI Image they appear to be using the sRGB color space rather than P3.
I can't see a way to specify the color space to use in the Asset Catalog and cant see any function on Image to specify this. Is there a way to do it or do I need to go back to using PNGs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要进入SVG文件,然后将基于十六进制的颜色更改为使用此示例的P3颜色:
You need to go into the SVG file and change the hex based colors to using P3 colors like this example: