Question

I'm using the sip developer tool to get a specific color from this image:

http://dribbble.com/shots/1277834-Login-Thumb/attachments/176317

(The right side bottom section gray).

Sip returns:

[NSColor colorWithCalibratedRed:0.96 green:0.96 blue:0.96 alpha:1]

Which is in RGB: RGB(226, 226, 226)

However, when I use this myself in code, the background color in my app (when checking with sip) is RGB(232, 232, 232)

Does anyone know why there is such a difference?

I've also tried to calculate it manually from RGB by dividing by 255.0 - same problem.

I have the same issue with other colors, plain solid colors too..

Was it helpful?

Solution

This is probably a colour space thing. I'd guess that sip is not calibrated or calculated the same way as the NSColor function.

Anyway, if you use DigitalColor Meter you should get the same colours out as the colours that you put in.

As it's a native app I feel I can rely on its results more than I would a third party app.

Also I think your calculation is off slightly. 0.96 is actually 245 not 226.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top