sindresorhus/Defaults

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

Open

#143 geöffnet am 16. Juni 2023

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Swift (162 Forks)user submission
enhancementhelp wanted

Repository-Metriken

Stars
 (2.465 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide