Detecting the connected display color format and bit depth

My application needs to detect at run time the color format (RGB/YUV) and the bit depth (8/10bit) of the connected display.
The display can be connected after the PC has been running.
I am running on Ubuntu 20.04 and using X.
Is such detection possible? How?

@generix Any idea if this is possible?

I’m not sure which color format/bit depth you mean, the ones the monitor is capable of (can be parsed from edid) or the ones actually set (color format->nvidia-settings, bit depth->xdpyinfo).

The monitor’s on screen menu provides an option to switch between RGB/YUV.
I couldn’t find any difference in EDID when switching between the 2 options.
Is there any notification of settings between the display and graphics card other then EDID?

The EDID contains the capabilities, not the settings. ColorSpace in nvidia-settings -q all reflects the current setting.

Does the display send (or has any way of sending) any information to the graphics card other then the EDID?
The display I am using has an on screen menu which allows selection of color space (RGB/YUV). I am wondering how this selection when done on the display effects the setting in the graphics card.

I don’t think so

Good question. Probably not at all. Did you check nvidia settings if anything canges?