title: iOS: Colors defined in Interface Builder different from colors in Web View
body: <p>We're building an iOS app which partly makes use of <code>UIWebView</code>s to render some UI elements. I noticed, that colors which are defined on the Storyboard are rendered differently than colors with the <strong>same</strong> values in the Web View. The following screenshot shows three example colors on the storyboard and in the emulator: <code>#00C2F0</code>, <code>#00843C</code> and <code>#FF008F</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/ChNhD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ChNhD.png" alt="shifted colors Interface Builder and Emulator"></a></p>
  
  <p>The left squares show each color rendered as CSS <code>background-color</code> within a <code>UIWebView</code>, the right square shows the color assigned as background to a <code>UIView</code> directly through Interface Builder. </p>
  
  <p>When I take a screenshot and measure the color values in Photoshop, the color shown within the <code>UIWebView</code> is exactly as defined (i.e. exactly matching the hex color values given above), whereas the color shown through the <code>UIView</code> is shifted.</p>
  
  <p>I've read several posts about "wrong" colors on iOS, which explain this "issue" due to color management with the goal to have a consistent visual appearance on all devices (e.g. <a href="https://stackoverflow.com/questions/14578759/wrong-color-in-interface-builder">here</a> or <a href="https://stackoverflow.com/questions/10039641/ios-color-on-xcode-simulator-is-different-from-the-color-on-device">here</a>). While this sounds totally reasonable, it does not explain the inconsistent rendering through different controls.</p>
  
  <p>Is there anything I can do to achieve matching colors between iOS native views and colors rendered within a <code>UIWebView</code>?</p>