Support for blend modes with variables

Our design system leverages mix blend modes for hover states so our icon buttons appear on any background color and remain accessible, without needing separate hover–on-primary, hover–on-secondary, etc tokens. We use multiply for light theme, and screen for dark theme. It would be really awesome if we could apply blend modes directly to the color variables, OR support blend modes as variables in general.

Our current work around is to apply the blend mode directly on each component variant, but this requires us to define separate light and dark theme variants. would be great if we could use variables here to have it automatically switch between light/dark.

4 Likes

Thanks for the feedback!

We’ll pass this onto our Variables team for consideration

2 Likes

thank you!!

+1 to this! It’s essential to implement apple’s official documentation for Material blurs using variables

1 Like

please please please get this out next update. our team really need this.

Our team needs this as well! We are using “multiply” for our hover states to gain accessibility no matter what color the button background is, but need to turn this off in dark mode.

When you set a color to use a variable the color picker UI hides the blend mode button, however the blend modes still work. You should be able to see what blend mode a color is set to even if it’s controlled by a variable.

Before variable:

After variable (button is missing):
image

I’d benefit from this as well — my systems swap between screen + color dodge vs multiply + color burn depending on the ui theme selection.

Just have run in to an issue where I am needing to use a simple raster image on different color modes like dark and light, and need the image to be able to switch blending modes to go from being a mostly dark image to inverted light one.

The way to get around this currently is by using bools to toggle between multiple copies of the raster image’s visibility when each is set to different color blend modes like “Normal” and “Difference” for example…

It would also be nice to just be able to not only control layer visibility but individual properties like FILL and STROKE visibility as well (stroke is less important since a value of zero can be used to effectively also “hide” a stroke’s visibility via mode controls)

Hi @JDPoZ, Thank you so much for sharing your thoughts on variable. Your detailed description of your use case and workaround is incredibly helpful.

It sounds like both of your ideas could be really beneficial for other members of our community. We’re excited to see how they’ll respond to your suggestions.

If anyone in our community supports this idea, please show your enthusiasm by casting your vote!

Thanks again for taking the time to share your ideas with us.

Hi everyone :wave:,

I use blend mode for colors and I found out that there isn’t any option like blend mode in variables panel.

Blend mode in variable panel while choosing a color would be amazing.

Blend mode exits in color fill panel - water drop icon
Blend mode is missing in variables - water drop icon doesn’t exits

1 Like

+1 to blend modes in variables, can’t do light / dark modes without being able to switch the blend mode.

1 Like

This is incredibly important for theming dark/light modes, which feels like a basic use case for variables.

1 Like

@dvaliao This topic “Support for blend modes with variables” was created a half a year ago, but nothing has been changed. It’s a bug, because when you create a color with a blend mode, then define it as a variable, this variable loses the blend mode. At that moment you have two different values of this variable. First one, a frame with color from which you put it in Variables. Second one, all new frames with the same name of the color, but with different value, because it had lost the blend mode

Please do something with this issue! :pray: