sindresorhus/Defaults

Use `Color.Resolved` to serialize `Color` on macOS 14+

Open

#143 建立於 2023年6月16日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Swift (162 fork)user submission
enhancementhelp wanted

倉庫指標

Star
 (2,465 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

https://developer.apple.com/documentation/swiftui/color/resolve(in:) https://developer.apple.com/documentation/swiftui/color/resolved

It should be able to store the color better than what we currently do. We still need to preserve backwards compatibility, so we can first try loading it as Color.Resolved and if it fails, we can use the old way.

Color.Resolved is Codable, so we should use that for the serialization.

貢獻者指南