Is there a node or combination of nodes that can take an average colour out of a single image? This is the opposite of what people usually ask for, where when there is no UV Map for an image texture, an average of the image is applied to the model.

However in this case I am asking if there is a way to use an image to generate a single colour that can then be passed through other nodes.

For example in this Screenshot, the image texture would apply as an image texture to the top half, whereas the same image would produce a single colour, pass through a HSB node to be darkened to produce the bottom colour. Currently I am manually selecting the colour.
If you shrink the image to a size smaller than a pixel of the render result it will render as average, so you could just change the mapping of the coordinates:



You can use vector mapping node as well.

That might not be the most efficient way to calculate the average, but it's easy to achieve and it works.