title: SwiftUI List Background color
body: <p>I am trying on setting a view background color to black with the following code</p>
  
  <pre><code>struct RuleList: View {[![enter image description here][1]][1]
  private var presenter: ConfigurationPresenter?
  
  @ObservedObject
  private var viewModel: RowListViewModel
  
  init(presenter: ConfigurationPresenter?, viewModel: RowListViewModel) {
      self.presenter = presenter
      self.viewModel = viewModel
  }
  
  var body: some View {
      List(viewModel.configurations) { configuration in
          RuleListRow(website: configuration.website).background(Color.black)
      }.background(Color.black)
  }
  }
  
  struct RuleListRow: View {
  var website: Website
  @State private var websiteState = 0
  
  var body: some View {
      VStack {
          Text(website.id).foregroundColor(.white)
  
          Picker(website.id, selection: $websiteState) {
              Text("Permis").tag(0)
              Text("Ascuns").tag(1)
              Text("Blocat").tag(2)
          }.pickerStyle(SegmentedPickerStyle()).background(Color.crimson)
      }.listRowBackground(Color.green)
  }
  }
  </code></pre>
  
  <p>The view is hosted in a mixed UIKit -  SwiftUI storyboard, so this specific view is embed in a Hosting controller</p>
  
  <pre><code>class ConfigurationHostingController: UIHostingController&lt;RuleList&gt; {
  private var presenter: ConfigurationPresenter = ConfigurationPresenter()
  
  required init?(coder: NSCoder) {
      super.init(rootView: RuleList(presenter: presenter, viewModel: presenter.rowListViewModel))
  }
  }
  </code></pre>
  
  <p>I've tried any combination of <code>.background</code>, <code>.listRowBackground(Color.black)</code> and <code>.colorMultiply(.black)</code> I could think of, and the best I got is this </p>
  
  <p><a href="https://i.stack.imgur.com/irWH2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/irWH2.png" alt="issue"></a></p>