title: SwiftUI images as custom "radio" buttons
body: <p>I want to have a simple Color Picker with a few pre-defined colours. The user should only be able to pick one of the colors. </p>
  
  <p>It should work like a "radio" input where when one color is selected, the other colors uncheck.</p>
  
  <p>I decided a decent approach would be to have images that use the system "circle.fill", and, "checkmark.circle.fill" for the selected item. I would just set the <code>foregroundColor</code> for each to their corresponding <code>.color</code>.</p>
  
  <p>I'm having a rough time figuring out the logic for this though. I know I can create a simple View for the images themselves and pass the <code>.color</code> to each one, but how would I go about ensuring only 1 image is "checked" at once, and obtaining the value from the "checked" image so it can be passed to Core Data?</p>
  
  <p>I guess I can use state <code>$var</code> which changes, but how do I unselect all of the other images when one is selected? Should I put the images in an array or something? I'm lost.</p>