sindresorhus/Defaults

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

Open

#143 ouverte le 16 juin 2023

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Swift (162 forks)user submission
enhancementhelp wanted

Métriques du dépôt

Stars
 (2 465 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur