I want to take a string and see if there's a matching color in my bundles asset catalog. If it exists the set a variable to that color and if not set to another.
e.g
let matchedColor = Color(string) ?? Color.red
however as Color(string) is not an optional I can't use nil coalescing operator.
You could use something like this:
Which is a short for: