I want to save SwiftUI Color's (type Color not UIColor) to my server. To do that I need to convert them to a string. I think the most convenient would be a Hex String. I followed the following stack solution to convert a Hex to a SwiftUI color:
but I'm not sure how to go the other way and convert the SwiftUI Color type to a Hex String?