I am develop a plugin that can apply variable colors by some rule.
I found I need to assign the value like this:
I know that “e1b04111db373f08ec909607224cbaf0ff8aa032” is the variable’s id, but what is the “/2671:40” , and how do I acquire it?
I am using
const tokensCollection = libraryVariableCollections.find(collection => collection.name === "Tokens");
if (tokensCollection) {
const libraryVariables = await figma.teamLibrary.getVariablesInLibraryCollectionAsync(tokensCollection.key);
const hoverlibraryVariable = libraryVariables.find(variable => variable.name.includes("Hover"));
console.log(hoverlibraryVariable.key)
}
but it only get “e1b04111db373f08ec909607224cbaf0ff8aa032” part