In SwiftUI on my device, I set the appearance to dark mode. However, my application doesn't change the background colour based on that appearance. For the color asset, I have set the values for both the light and dark appearance, like so

[![Image](https://i.stack.imgur.com/pfSGB.png)](https://i.stack.imgur.com/pfSGB.png)

In my code this is how I set the background color and static variable,

```
extension Color {
  static let backgroundColor = Color("Background")
}

..... // In my View 
        ZStack {
        Color.backgroundColor
            .ignoresSafeArea()
        ......
        }

```

Also when I debug and check

```
@Environment (\.colorScheme) var colorScheme:ColorScheme

```

it returns that my device is indeed on dark mode. Any idea what is going on and why I'm unable to activate dark mode automatically from the user's device preferences.