Skip to main content
Haoyang_Liang
December 6, 2022
Question

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

  • December 6, 2022
  • 3 replies
  • 1712 views

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 replies.

3 replies

tank666
December 6, 2022

figma.getLocalPaintStyles()

figma.com
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Haoyang_Liang
December 7, 2022

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

Abhinav1
New Member
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?