I am developing a Figma plugin that replaces the colors of the selection, with new ones. I want to display on the screen how the change will look before generating it on the Figma canvas.
What I did was to store the node into a variable and then try to change it according to it. What happened was, it was changing the actual component in Figma, not on the copy of the selection have. I want something which can create an exact replica of the selection, and then i want to use it for viewing it on my plugin, because the changes that i do for it is actually affecting the original node.