How to use colorPicker at another View?

After selecting the color, the background color of another view I don't know how to change it at the same time.

struct ContentView: View { @State private var bgColor = Color.white

var body: some View { VStack { ColorPicker("Background Color", selection: $bgColor) } } }

Thank you for your cooperation, Professor!

You can try this:

struct ContentView: View {
    @State private var bgColor = Color.white
    var body: some View {
        ZStack {
            bgColor
                .ignoresSafeArea()
            VStack {
                ColorPicker("Background Color", selection: $bgColor)
            }
        }
        
    }
}
How to use colorPicker at another View?
 
 
Q