Impossible to change Colors within an existing gradient?

Why is it not possible (for me) to change already created document gradients (or global gradients) afterwards, so that the change can be applied to all layers that use the gradient?

The following procedure: I had created gradients consisting of 3 or 4 colours (which are actually also ColorVariables). Now I have changed one of these 4 ColorVariables slightly (an orange became a red). If I now try to assign the new colour red to the gradient by hand, this is only applied to the current layer and this layer loses the assignment from the document gradient! The document gradient still contains the orange. And I can’t find any other way to apply this colour change to the gradient. The only possibility I see is to create new gradients (with the red) and then manually assign these new gradients to all layers that previously contained the old gradient.

Unfortunately, you can only create a gradient by entering the colour values (HEX, RGB …) and not simply assign the ColorVariables from the document or a library. If this were possible, everything would automatically update when the colour variable is changed.

By the way, I also tried to replace the orange with the red using “Find and replace colour”. At first I thought that solved the problem. However, this function only replaced the orange part with red for all layers that use the gradient. BUT the document gradient remained unchanged (with the orange) … and unfortunately “Find and replace colour” detached all changed layers from the document gradient.

I really like the improvements that the Sketch team has recently added to the gradient handling. Kudos for that! But the handling of colours in gradients is really cumbersome.

How can I solve my problem? Can someone help here?

FeatureRequest: Please make it possible to assign colour variables to gradients … then my problem will be solved automatically. Please also make it possible that we get something like GradientVariables.

Whilst I can’t provide a fix for the situation you are currently experiencing, with many instances set to using a predefined Gradient Fill, I can perhaps offer a helpful tip to avoid this happening in the future.
That would be to define a new Layer Style for your Gradient Fill, and to then have all your various other instances use that same Layer Style, rather than just use the same Gradient Fill.
That way, you can edit and update your original Layer Style, and all other instances using the same Layer Style will be automatically updated as well.

1 Like

Hi @Brett ,

thanks for your advice. I have already used the workaround you showed, but unfortunately I can’t apply LayerStyles to fonts. And that’s exactly what has a big part in my problem.

Furthermore, it doesn’t work correctly if I group the font (or even put it into its own symbol) and then assign the LayerStyle to this grouping/symbol. It can be assigned, but the font (or the grouped font/symbol) does not appear in the gradient colours, but in some other random colour that is unknown to me.

(Interestingly, after I assign the gradient layer style to a grouped font or symbol, Sketch shows me the gradient in the colortints. This is already close to my feature request for GradientTints … but unfortunately it does not work at the moment as described here).

Indeed, it would be different for fonts.
You could do the same process, setting up the Gradient Fill initially, but then creating a Text Style out of it, rather than a Layer Style.
But I am guessing that still might not work for you, because then applying that Text Style in other places would adjust the font family, weight, and size, along with the gradient. :thinking: