How to get color at any document position?

Is it possible to get the visible color (same as the color picker would return) at any point of the document? No matter if it is a pixel of an image or a shape.

There is no such API