Skip to main content

if i need to create Color Gradient in Local Variables, How can i do it ?

Hi there,

It’s not possible at the moment, but it’s in our radar! Feel free to vote up this feature request here: Allow gradients in color variables


In the meantime, a user has found a workaround that may interest you here:



Hope this helps.


In Figma, you can create a Color Gradient using Local Variables by following these steps:




  1. Create Local Styles:



    • Go to the right sidebar and open the “Design” tab.

    • Under “Styles,” create a new Local Style for each color stop in your gradient.




  2. Apply Local Styles:



    • Select an object (e.g., a rectangle) that you want to apply the gradient to.

    • Open the “Fill” property in the right sidebar.

    • Click on the color box, and you’ll see the option to choose styles. Apply the Local Styles you created.




  3. Add Color Stops:



    • To create a gradient, use the “Linear Gradient” option.

    • After applying the Local Styles to your object, you can click on the gradient in the “Fill” property to add color stops.




  4. Adjust Gradient Stops:



    • Drag the color stops along the gradient bar to adjust the distribution of colors.

    • You can also fine-tune the colors by adjusting the Local Styles you created earlier.




  5. Update Local Styles:



    • If you want to modify the gradient, go back to your Local Styles and update the colors. The changes will reflect across all objects using those styles.




By using Local Styles, you maintain consistency across your design, and any changes to the Local Styles will automatically update objects using those styles. This ensures a more efficient and flexible design workflow.


Hope this will help.


If anyone else stumbles upon this AI nonsense confusing variables and styles from Google like I did, no, you can’t use gradients in variables.


Figma has officially announced this feature at Figma’s Framework 2024 event. Now it is possible to bind color variables to the gradient stops.


Playground file with a sample here: https://www.figma.com/community/file/1234936397107899445


That’s sound good 🔥

thank you


Half-way there, now we just need to have actual full gradients in variables (or the style), rather than variables in gradient stops.


I definitely agree. The ability to store a gradient for swapping between light and dark mode would save me a lot of time in my demo workflow. It’s a shame that we have to work around it at the moment!


I also have the same question! Adding a color gradient in Local Variables would be really helpful for my current project. Looking forward to hearing some tips or a workaround from others in the community. 😊


Is there any one who can guide me? I would love your guidance. 😀 Thanks!


Reply