Posts

Post not yet marked as solved
14 Replies
14k Views
Hi, should color literals work inside Views, I am sure this used to work? Xcode Version 13.0 (13A233) Note, myColor works, but the same literal in the fill does not. let myColor = Color(#colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255)) struct TestView: View {   var body: some View {     RoundedRectangle(cornerRadius: 25)       .fill(Color(#colorLiteral(red: 0.292, green: 0.081, blue: 0.6, alpha: 255)))       .frame(width: 100, height: 100)           } }
Posted Last updated
.