Reputation: 28187
I have a UIImageView
that I've pointed to a PNG who's background is RGB(240,240,240)
. I've then set the parent UIView's background to the same colour in Interface Builder.
You'll notice that they are slightly different. When I take a screenshot and re-examine, I see that the UIView's background in IB is not RGB(240,240,240)
, but RGB(236,236,236)
.
Why is this??
Upvotes: 5
Views: 714
Reputation: 169
RGB value is meaningless without knowing the colorspace. Make sure you choose "Generic RGB" colorspace when selecting the color using the RGB sliders in Interface Builder.
Upvotes: 0
Reputation: 105
I had to tweak the numbers I used in IB to get my colors to match.
For example: You want (240,240,240) and it gives you (236,236,236) dispite that you entered (240,240,240).
I entered (244,244,244) and it gave me a color closer to (240,240,240). I figured if I entered 240 and it gave me 236, then I should add 4 to my original colour code.
I had to do this a couple of times to get the right number.
Not an elegant solution but worked for me.
Upvotes: 0
Reputation: 1390
Do you have a manufacturer specific monitor driver installed? Have a look at the monitor profile. Its probably different from the colour profile in photoshop
Upvotes: 1