Instance swapping of icons

I am relatively new to Figma and here is what I have done aso far and what I am trying to accomplish:

  • I’ve created a set of typical button variants
  • When I create a button instance everything works as expected. I am able to change the size, type (hover etc) and show icon left or right

So far so good

What I am trying to do now is import in a set of icons and be able to instance swap them and also have then change color depending on which mode (dark or light)

How do I go about doing this?
What determines the color of the icon? The background?