We are creating an iOS application that partially uses UIWebView to display some interface elements. I noticed that the colors that are defined on the Storyboard render differently than colors with the same values in the web view. The following screenshot shows three color examples on the storyboard and in the emulator: #00C2F0 , #00843C and #FF008F .

In the left square, each color is displayed as CSS background-color within the UIWebView , the right square shows the color assigned as the UIView background, directly through the Interface Builder.
When I take a screenshot and measure the color values in Photoshop, the color shown in the UIWebView is exactly the same as defined (that is, exactly matches the hex color values shown above), while the color shown through the UIView is offset.
I read several posts about “wrong” colors in iOS that explain this “problem” due to color management in order to have a consistent look across all devices (like here or here ). Although this sounds quite reasonable, it does not explain inconsistent visualization using different controls.
Is there anything I can do to match colors between iOS native views and colors displayed in UIWebView ?
source share