Closed hank121314 closed 2 years ago
After this PR is merged, do you plan any more changes, or should I do a release?
After this PR is merged, do you plan any more changes, or should I do a release?
I have no immediate plan for any more changes. I think we should do a release after this PR gets merged.
Thanks!
Summary
Fixes: #97.
By default,
ColorBridge
will convertColor
intoUIColor
in non-macOS platform.UIColor
does not preserve the color space, butColor
should store the color space.Solution
Trying to preserve color space whenever
Color.cgColor
exists. IfSwiftUi.Color
hascgColor
property, Defaults will serialize and store its colorspace and components, then deserialize it with these properties. If not, Defaults will useNSSecureCodingBridge
to do the serialization and deserialization.Thanks
Thanks for your code review 😄 !