Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different colors even though RGB values are equal

I'm facing a quite weird color issue with the Interface Builder in Xcode.

I've set the background of my view in my view controller to #1F242C:

view controller's view background

So far so good. Then I create a UITableViewCell in a nib file where I set the background to the exact same color #1F242C:

table view cell view background

Now when I start the app, the background of the UITableViewCell is suddenly different from the viewcontroller view's background, even though the RGB values match and the opacity too.

When I analyze a screenshot with Photoshop

The view's background is: #29303A

and the cell's background is: #1F242C

Whey are they different colors despite the RGB values being the same? I don't change the colors programmatically in my source code.

Here's how the different colors look:

enter image description here

like image 737
productioncoder Avatar asked Nov 18 '16 15:11

productioncoder


1 Answers

This is an issue due to iOS 10 and the new extended color gamut of the new devices screens.

Click on the wheel at the right of "RGB slider" in your color picker, and chose sRGB IEC61966 2-1.

You will see that the RGB values will change at this point. Put them back to the RGB values you previously entered. That should be it!

color gamut

like image 191
Matthias Avatar answered Nov 07 '22 02:11

Matthias