iOS - color on Xcode simulator is different from the color on device

user1046037 picture user1046037 · Apr 6, 2012 · Viewed 26.7k times · Source

Overview

The background color of my iPhone app in the simulator (iMac) looks different from the color on the device (iPhone 3GS).

EDIT (following section has been added)

The following are all different:

  1. story board color (xib file)
  2. simulator color
  3. device color

I suppose I should go with how it looks on the device.

Questions

  1. Is this is a common problem other developers face and is there a way to match the colors (systematic procedure) ?
  2. will the color look different on different versions of iPhone (3gs / 4 / 4s) or all the color ?
  3. Am I missing something, is there any specific color profile I should use ?
  4. Is there something like a rule of thumb where RGB values vary by a certain percentage ?
  5. In iPhone 4 and 4S, do the color match the simulator ? ( I don't have a iPhone4 and 4S, so I am not sure.)

Answer

user1046037 picture user1046037 · Apr 6, 2012

Credit goes to @jtbandes for suggesting to send screenshots which led to the solution

I am just answering the question for completeness.

Steps I followed:

  1. Take a screenshot of image in storyboard
  2. Take a screenshot of image in device (use mail / photo stream back to your mac)
  3. Use color picker (part of mac OS color palette) to pick the same spot on both the screenshots
  4. Note down the RGB values (available on the mac OS color palette) of spots chosen in step 3
  5. compare both the RGB values and see the difference
  6. add the RGB offset to match the color.

My RGB offset (not be followed blindly)

based on my experience, i added the following RGB values to get the color I wanted, it is only rough and worked for me:

  • Red +12
  • Green +19
  • Blue +16

Different angles (best to keep it horizontal)

Holding the phone in different angles also gives different shades, keeping it horizontal did give the color