title: UITableView Footer and Header Background color darker than specified
body: <p>I'm Trying to style a TableviewController, and I wish to set the background to a very light gray and the cells to white, with thick borders of the same gray shade. However, after I set background and header colors, they both turn to be a very dark shade (the color code is ok, and the footer is darker than the header).</p>
  
  <p>This is my code:</p>
  
  <pre><code>    override func viewDidLoad() {
          super.viewDidLoad()
          self.tableView.backgroundView?.backgroundColor = gainsBoro
          self.tableView.backgroundColor = gainsBoro
          self.tableView.separatorStyle = .none
          self.tableView.tableFooterView = UIView()
      }
  </code></pre>
  
  <p>and to set the header color:</p>
  
  <pre><code>override func tableView(_ tableView: UITableView, willDisplayHeaderView view:UIView, forSection: Int) {
      if let headerTitle = view as? UITableViewHeaderFooterView {
          headerTitle.textLabel?.textColor = UIColor.black
          headerTitle.backgroundView?.backgroundColor = gainsBoro
      }
  }
  </code></pre>
  
  <p>And the result:</p>
  
  <p><a href="https://i.stack.imgur.com/oDQeb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oDQeb.png" alt="enter image description here"></a></p>
  
  <p>Any Ideas?</p>