Colour space matching iOS

459 views Asked by At

I have a purple color from a design that has a hex value of #ae359f.

I convert this hex into a UIColor, load it on the simulator and take a screenshot.

I open both the design and the screenshot in photoshop, and use the eyedropper and they both have the same hex value of #ae359f, however, they are visibly different colours.

Must be a colorspace issue - which I've read about a few times and still don't really get it. If its on the same device why the f can't #ae359f be the same everywhere! Who's fault is this.

So, the question is... how can i make UIColor look like AdobeRGB values - i can do it in interface builder I think...

1

There are 1 answers

3
justin On BEST ANSWER

Color Management is not supported on iOS in this graphics stack. Quartz et al will treat your colors as sRGB.

You could introduce a conversion routine for AdobeRGB -> sRGB, but the easy way is to just provide colors in sRGB values.


There's a little disclaimer at the end of the reference.

COLOR SPACES AND IOS

iOS does not support ColorSync, so all assets should be provided in the native device color space: sRGB.

More info in this Tech Note: https://developer.apple.com/library/ios/technotes/tn2313/_index.html