title: What is the default color space for UIColor?
body: <p>I can not find an article or a document describing which color space should be used for RGB values when initialising an instance from UIColor class.</p>
  
  <p>The article <a href="http://inaka.net/blog/2014/09/05/getting-the-right-colors-in-your-ios-app/" rel="noreferrer">Getting the right colors in your ios app</a> says we should use Generic RGB. On the other hand, I have found several posts saying that we should definitely use sRGB on iOS.</p>
  
  <p>It seems the default color space is sRGB as written here in <a href="https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGColorSpace/index.html" rel="noreferrer">CGColorSpace Reference</a></p>
  
  <p>There is <a href="http://devstreaming.apple.com/videos/wwdc/2016/712ugi7vg8jznn3pc3u/712/712_working_with_wide_color.pdf" rel="noreferrer">a new color space</a> called "Display P3" used in the iPad Pro and iPhone 7.  The profile in the existing image resources has to be converted to the Display P3. For Digital Color Meter app the P3 profile has to be selected in order to get "Display P3" RGB values. See the screenshot. </p>
  
  <p><a href="https://i.stack.imgur.com/MZ3HZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MZ3HZ.png" alt="How to pick the right RGB values for the Display P3 color space."></a>
  <a href="https://i.stack.imgur.com/Vge2F.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Vge2F.png" alt="enter image description here"></a></p>