Widget color variants

Our UI Elements have a different colour depending if they are placed on a white or a black background. Until now we have to duplicate every single widget with 2 different colours. Is there a way of avoiding this, so we could just have only one widget (with all included interactions) and the possibility to change the colour scheme?