How do I show my Color data in Text() view the right way? I tried 3 methods but not work for all.
Error = Initializer ‘init(_:)’ requires that ‘Color’ conform to ‘StringProtocol’
var body: some View {
Text("(colorΩ)")
Text(String(colorΩ))
Text(colorΩ)
}
2
Answers
The goal is not clear but a possible variant is
Tested with Xcode 14 / iOS 16
You can also do it in another way similar to @Asperi answer: