Very nice indeed!!! Thanks!! We had in the past carried out user testing on these toggles and lots of ‘real’ end users ran into trouble getting confused on what the active/end selection is that they selected. The more they clicked it, the more confused they got about whether it’s a “yes or no” in your example.
We found that even different contrast colours still created a confusion. We tried dimming the inactive state which helped a little in the success rate.
It’s interesting perception from a cognitive perspective.
Although it looks cool - it is now always clean what is the selected state. Is it the dark red or the white? Usually selected is highlighted so some people would expect the white to be the selected state… but in your case you probably mean the red state to be selected.
So you are actually introducing an extra cognitive load for people to be in doubt of what is really the selected state first.
So you might want to introduce an extra confirmation in the visual what is the selected state to make this crystal clear.