Skip to main content
Question

Is it a plugin API that can list the local styles and update their values?

  • December 6, 2022
  • 3 replies
  • 1582 views

Haoyang_Liang

I am looking for a way to list all local styles of a file and update their values through the plugin API but not sure if it is even possible. Specifically, I want to see if I can grab the green color and change it to yellow:

image

This topic has been closed for comments

3 replies

tank666
  • 4868 replies
  • December 6, 2022

figma.getLocalPaintStyles()

figma.com

Haoyang_Liang

Thanks! It’s not included in the index section and hard to find…


Abhinav1
  • New Member
  • 4 replies
  • April 25, 2024

Hi, I know we can get all the local styles using the plugin api Figma.getLocalPaintStyles(). But is there any API to update or add localStyles? Basically I want to get all the colors from the selected frames using Figma.getSelectionColors(). And then add the colors as variables or color styles. How do I add/update variables or colorstyles using any plugin API?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings