문제

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..

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top