How to make a Color codable?

Code Block
struct Theme: Codable{
var color: Color
var cards:[MemoryGame<CardContent>.Card]
var name:String
}

Here the var color: Color is not going to be Codable. So whats the solution.
Answered by OOPer in 644116022
Better check this thread:
How to have Codable Color?

You may need to implement init(from:) and encode(to:) by yourself.
Accepted Answer
Better check this thread:
How to have Codable Color?

You may need to implement init(from:) and encode(to:) by yourself.
How to make a Color codable?
 
 
Q