Changing icon color in variants problem

If you have some problems with changing color while using variants in Figma, Here is a solution:

All in all, you need to Flatten each layer of a variant, for this, as you know Figma doesn’t have the Flatten each layer option, so I suggest you download the Automator plugin.

After that, Select all layers (you can do this by pressing Enter while selecting the parent layer) Run Automator > Object > Flatten selection, then click Flatten each layer.

Done!