title: Changing Tab Bar Color (Swift)
body: <p>I am trying to change the tab bar color in a view controller in XCode using swift. I have a hex that I matched up to an RGB value and I am trying to set that in this code. (Which does not work)</p>
  
  <pre><code>let color = UIColor(red: 41, green: 40, blue: 39, alpha: 1.0)
  UITabBar.appearance().barTintColor = color
  </code></pre>
  
  <p>However this code does:</p>
  
  <pre><code>UITabBar.appearance().barTintColor = UIColor.whiteColor()
  </code></pre>
  
  <p>Can anyone explain why this doesn't work, and what I can do to fix it?</p>