1

In InDesign

enter image description here

In Photoshop jpeg exported from InDesign

enter image description here

this is how it looks on the real device

enter image description here

I saw the strange issue that when I take color code in RGB format or hexacode from Adobe InDesign file for a UI element like button and set that in my Xcode from interface builder to the button, it looks different color on App on iPhone(6) real device and simulator(All device simulator) both.

but when I export the InDesign file to jpeg and open in photoshop and take the color code from there then

  1. It shows different color code from InDesign file (Strange).

  2. If I use that color code in Xcode in interface builder then it shows again different color in real device and simulator. But when I take a snapshot of the simulator and compare in photoshop that simulator snapshot image with jpeg( I exported from InDesign), they show same color code but looks different color on iPhone real device.

I want the color code that works for me and looks same as InDesign have.

How can I get that?

Sushobhit
  • 305
  • 4
  • 18
  • 1
    Possible duplicate of [Wrong color in Interface Builder](https://stackoverflow.com/questions/14578759/wrong-color-in-interface-builder) – Tamás Sengel Dec 14 '17 at 14:43

1 Answers1

0

I Followed these steps to resolve my problem

  • Add the color in Assets.xcassets folder in your Project. click on + button and select New Color Setenter image description here

  • set color in sRGB color space as enter image description here

  • I use hex code that is given in InDegisn and it works.
  • Use it in storyboard as enter image description here
  • in code as enter image description here

Note - this will work on ios 11 and above.

Sushobhit
  • 305
  • 4
  • 18