1

If I replace an icon that's inside another component, the color of that icon also changes. What I want is being able to set one color for the component, and every icon I swap should take over that color.

The icon itself has a color style applied.

This is what currently happens: enter image description here

The icon should stay blue in this instance, and not change to the color style that comes with the icon.

How can I accomplish this?

2 Answers 2

1

This is occurring because the colors are different (blue kebab-icon and gray edit-icon) in the master components. Depending on your use case, you can achieve the desired output in the following 2 ways:

  • Prepare color styles and apply it to all master components before swapping.
  • Create a color style, swap icon instance, and select the desired color style, thus only affecting the single instance instead of the master component.
1
  • 1
    I don't think that solves my issue. I already have a color style on the icons, but I want a different color style when those icons are embedded in buttons. Jul 13, 2021 at 15:22
0

There is an answer in the Figma community that helps achieving exactly what you want.

Ensure that all icons that might be placed in the button have the same structure. Specifically, the layers that inherit new colors must have the same names.

This worked just fine for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.