Match background colour with an image dynamically?

Hi All,

I’m allowing users to upload images onto my site which will be saved under a collection. With that, I will populate a slideshow to show these images using code and the collection, which is all fine.

I would like to find out whether there is a way for the slideshow background colour to match the image that’s being shown on that slide? For example if the image is predominantly green, then the background colour would also be green…

Thanks in advance!