Hi Alberto,
I experimented a bit with a local build of gtk3.0 in darktable: Changing this (and a 2nd location in gtkquartz.c) from the device-dependent CGColorSpaceCreateDeviceRGB () to a generic CGColorSpaceCreateWithName( kCGColorSpaceGenericRGB ) - like recommended by the macOS documentation - had no effect, the displayed colors remained exactly unchanged.
The limitation to sRGB actually seems to be here gdk/quartz/GdkQuartzView.c · gtk-3-24 · GNOME / gtk · GitLab
By replacing kCGColorSpaceSRGB with kCGColorSpaceDCIP3 there I finally get the DCI-P3 gamut in darktable, that my iMac 27" 2020 screen is capable of. ![]()
But the colors seem to be oversaturated in darktable now … need to do further checks …
Georg
Edit:
needs to be kCGColorSpaceDisplayP3 instead of kCGColorSpaceDCIP3, of course (sloppy me!) - the apparent increased saturation came from the different gamma (2.6 with DCI P3 vs. 2.2 of Display P3).
Measured a printer test image (in Prophoto RGB, and also converted to Adobe RGB, sRGB), colors in darktable are now the same as rendered by Photoshop and macOS Preview on the same display, and cover the Display P3 gamut.
It works for me now, but of course this is not a generic solution. By patching gtk this way, one can utilize wide-gamut displays, but is bound to standardized color spaces like Adobe RGB or Display P3, and it’s a static, compile-time “solution”. Disappointing that gtk seems to have no ambitions at color management at all (see the comment from one of its devs in macOS: gtk3 3.24.36 changed determining system display profile over gtk3 3.24.34 (#5579) · Issues · GNOME / gtk · GitLab “Gtk doesn’t have any color management capability and doesn’t advertise anywhere that it does.”) - I wonder how this works on Linux and Windows.