iOS - xcode模拟器上的颜色不同于设备上的颜色 [英] iOS - color on xcode simulator is different from the color on device

查看:645
本文介绍了iOS - xcode模拟器上的颜色不同于设备上的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

概述



我的iPhone应用程序在模拟器(iMac)的背景颜色看起来不同于设备上的颜色)。



EDIT(添加了以下部分)



所有不同:


  1. 故事板颜色(xib文件)

  2. 模拟器颜色

  3. 设备颜色

我想我应该去看看它在设备上的外观。



问题



  1. 会在不同版本的iPhone(3gs / 4 / 4s)或所有颜色上看起来不同的颜色?

  2. 我缺少什么,是否应该使用任何特定的颜色配置文件?

  3. 一定百分比?

  4. 在iPhone 4和4S中,颜色匹配模拟器? (我没有iPhone4和4S,所以我不确定。)


解决方案

Credit to @jtbandes建议发送导致解决方案的屏幕截图



我只是回答问题的完整性。



我遵循的步骤:


  1. 拍摄故事板中的图片屏幕截图

  2. 拍摄设备中的图片屏幕截图(使用邮件/照片流返回到您的Mac)

  3. 使用颜色选择器(mac OS调色板的一部分)

  4. 记下第3步中选择的点的RGB值(在Mac OS调色板上可用)

  5. RGB值并查看差异

  6. 添加RGB偏移以匹配颜色。

strong>根据我的经验,我添加了以下RGB值以获得我想要的颜色,我的RGB偏移(不盲目跟踪)






  • 红色+12

  • 绿色+19

  • 蓝色+16



不同的角度(最好保持水平) / p>

以不同的角度握住手机也会给出不同的色调,保持水平,给予颜色


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.)

解决方案

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

这篇关于iOS - xcode模拟器上的颜色不同于设备上的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆