Have images return only the dominant colour/color

When calling the media object you can access the colours as an array e.g.

colors {
hex
}

which returns an array (e.g.)

{
“hex”: “#C29C66
},
{
“hex”: “#CCBCDC
},
{
“hex”: “#757688
},
{
“hex”: “#5F4726
},
{
“hex”: “#F6E9CE
},
{
“hex”: “#242E3A
}

I would like this to be ordered by whichever colour is dominant in the image.

I have an example where a tiny part of the image is an orange graphic. When I call this particular image the orange colour is the first in the array.

In this image the actual dominant colour should be a light grey as that colour takes up most of the image, but there’s no way to sort the colours returned so that the grey hex colour is first - unless there is and I’m oblivious to it!