I'm in the unenviable position of working with a huge established codebase for an application that needs to work on both Windows and OSX. A section that I'm currently working on contains some legacy code for an eyedropper/color picker tool. Unfortunately I don't have a lot of experience developing for the Mac, so I'm hoping someone can shed some light on my problem.
The eyedropper colors are slightly wrong in some cases, and I traced the problem to a difference between the expected CGColorSpaceRef which is set by a call to CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB ) and the actual color space set by the primary display profile. Setting the OS display profile to generic RGB removes the discrepancy, but I want the eyedropper to get a consistent color no matter what the display profile is.
Would retrieving the primary monitor display profile and using that instead of the generic RGB one ensure that the eyedropper tool gets a consistent value? I found the CGColorSpaceCreateWithPlatformColorSpace(...) function, but according to the documentation it has been deprecated since OSX 10.6. What would be the current way to handle this in Quartz?
I feel a little constricted on this, since I have neither the authority or expertise to make major changes such as adding dependencies on additional frameworks.