Hello Florian,
Is your goal to implement a calibration/profiling solution?
Yes, but i want calibration+profiling. But now i have feeling that my expectation is go against macOS logic. I expect to have sRGB+D65 not only on my patch or on some applications (will Adobe do trick that you described?). But to have sRGB+D65 on every window - on desktop, in image viewer, in some color unrelated software and so on. So if by my calibration calculations for point (128, 128, 128) i want to have XYZ triple like (96.8785, 100, 112.1183). I expected to see this XYZ on any picture for this ddl. And for sure i expect that in my display profile i will have next: RGB(.5,.5,.5)->XYZ(96.8785, 100, 112.1183). But now if i put such values in profile, then on my desktop i will have different color for this rgb.
I guess what you're trying to achieve in steps 1 through 3 is a 'null' transform, but technically you can just tag the pixel buffer of your test patch window with the current display profile color space (CGColorSpace derived from ColorSyncProfileRef) and then set the gamma table using CGSetDisplayTransferByTable (as long as you remember that this is transient while the calling process is alive, not persistent), without first changing the actual display profile.
Thank you for tip.
After point 5 my display is not sRGB anymore. It is gamma 1.8, the same as in Generic RGB profile.
Well, no. If you look at the tone response graph of the generated profile, you should see it follows the sRGB curve (at least it should if a null transform was used and the calibration was set during the characterization measurements).
This is only for my window, while i'm care about OS-wide colors.
This happens because XYZ->RGB transformation from my profile is now used before graphics-board will apply LUTs from vcgt. And this is how it needs to be for the profile to produce the intended result, because the correct RGB numbers that need to be sent to the display to produce the intended intensity (or color) will only be arrived at after going through the videoLUT.
As i described before, I expected to find a way to have situation close to Windows - profile describe current state of display, which is calibrated to my target. So, is it not what ColorSync expect? Is color-related software tries to suppress colorsync transformations on their windows? Thank you very much again to answering all these questions. Best regards, Vitaly Bondar