I've made a custom view made by a path filled with a custom color.
This is the color:
And as you can see it already conforms to light and dark appearance.
But still, when I select the dark theme the color stays black. Do you know if I have to do some configuration for custom view and path?
This is the body of my custom view (I can't provide the fully path because of the Copyright)
struct ASymbol : View {
let symbolColor: Color
var body: some View {
GeometryReader { geometry in
Path { path in
let side = min(geometry.size.width, geometry.size.height)
path.move(to: CGPoint(x: side * 0.92, y: side * 0.79))
path.addLine(to: CGPoint(x: side * 0.5, y: 0))
path.addLine(to: CGPoint(x: 0, y: side))
path.addLine(to: CGPoint(x: side, y: side))
...
path.closeSubpath()
}
.fill(self.symbolColor)
}
}
}
Edit:
I've just noticed that this not work even if I apply my custom color to a text.