Skip to main content
Equinusocio
Jun 22, 2023 8:10 AM UTC

Add way to change opacity for color variables alias, fills, strokes, etc

When aliasing a color variable to another (img 1), or using it directly on an element (img 2), we should be able to override the opacity without the need to create a variable for each transparency variation:

Cant override opacity in the alias:

CleanShot 2023-06-22 at 10.09.00

Example 2

Cant override the fill opacity:

    159 replies

    Equinusocio
    Dec 7, 2023 10:11 AM UTC

    You can simplify the code by using transparent as starting color so you don’t have to do the calculation:

    /* Return a 70% transparent red */
    color: color-mix(in oklab, transparent, red 70%)
    
    Equinusocio
    Dec 7, 2023 10:12 AM UTC

    Also this is basically useless since we can’t set opacity for the shadow color once you set the variable…🤦
    CleanShot 2023-12-07 at 11.00.17

    Hampus_Svallfors
    Dec 8, 2023 8:15 PM UTC

    Agreeing with @Equinusocio, this does not work for me.

    Zlatko
    Active Member
    Dec 14, 2023 10:21 AM UTC

    Curious how in the video these variables are accessed. I‘m clicking where the person in the video clicks, but I don‘t get the option to bind it to a variable.

    Maker of kinverse.app
    Martin_Mateos_Sanchez
    Dec 14, 2023 12:13 PM UTC

    +1 to this! I’ve been struggling with this a lot. The layer workaround in the Tweet is enough for me for now, but directly applying the opacity to a variable referenced by a token would be much better. Hope to see it soon 🙂

    Equinusocio
    Dec 14, 2023 12:35 PM UTC

    Right click on the field. Really subtle. Sometime there is the icon, sometime you have to right click (on textfields). Really bad UI decisions lately.

    Zlatko
    Active Member
    Dec 14, 2023 12:49 PM UTC

    Oh, I see. I hope this is a temporary solution because variables are in beta, and they‘ll make it more intuitive after the official launch.

    Maker of kinverse.app
    Dec 20, 2023 11:02 AM UTC

    You can also shift + left click the field to go straight to the variables, this works on other variable fields too such as border radius, height etc. Not intuitive but a handy shortcut

    Franni
    New Participant
    Jan 25, 2024 1:10 PM UTC

    Replying because I CANNOT believe this is still not possible… How hard is it to implement this much needed feature?

    James_Walsh
    New Participant
    Jan 30, 2024 2:05 PM UTC

    Oversights like this make using variables awkward and lead to bad practice when time is tight.

    It’s a similar issue to not being able to just apply “bold” or another formatting override to a text style (especially inside a text block!)

    It’s adding blockers to a system that’s meant to make everyone’s job easier.

    Having to add a seperate variable for every 10 opacity is working harder, not smarter.