Need to show/hide images based on wrapping div's data-group

I am needing to show color swatches based on the dynamically pulled data-group values. Sometimes the data-group will include all 3 swatches (silver, rose and gold) and sometimes it will only include one. The images I am needing to show/hide are the ones with the silver, rose and gold classes. Let me know if I need to further clarify.

I know how to do this within the normal Webflow CMS but because of the way the stupid filters work I have to embed code and put the swatches in the embed.