contrast – Color picker – what to do if the user selects the same color as the background?

I am working on a app that has an area dedicated to color choosing, like so:

enter image description here

Now, ordinarily, this works fine, but what if the user chooses the same color as the background color? It would look like this:

enter image description here

This is poor in terms of contrast and the fact that it’s a color is barely evident.

My current solution is to use a slight shadow (as pictured above) but that does not fully address the issue. What other possible solutions are there to establish contrast between the selected color and the background? Ideas would be much appreciated.