Dynamic Gallery, filter images by dominant colors

Hey everybody,

I´m a total beginner with webflow and webdev in general, so I´m not sure if I´m posting in the right thread. I´d like to do a image gallery where I can sort the images by different tags but also by color. E.g I click a button and all the images in the gallery get sorted automatically by there dominant color (not average). Is there allready a solution for a project like this or can somebody point me in the right direction? Thank you.