How to add color gradient in Local Variables?

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

2 Likes

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.

3 Likes

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.

1 Like