I have a similar situation, but resolved it by putting two buttons inside the square, stacked on top of each other, one of each color. Neither is visible on page load, both are collapsed when hidden, and both have a conditional to make them visible. Because I had some trouble getting data into the buttons, I opted for nine groups instead of a repeating group–but I hope to refactor them back as one repeating group later, as my dev skills improve.
1 Like