Add Transparency to Theme Colors

If I want to used themed colors in Perspective, how can I add the transparency attribute in addition to the RGB? For example,

var(--div-9) light is #D7FAF8
How can I turn it into #D7FAF880? Specifically, inside a named style?

you want to change --div-9,
or create a style that makes any backgroundcolor transparant?

While you're correct that I can't just change the color for use on the background, like I wanted, there is an opacity attribute for the entire component that can be changed and provides close to what I was looking for.

i didnt say it wasnt possible at all xd
because it is possible. i just dont know which you wanted

-edit oh oops i did make a typo, cant should been want

put this in an expression, binded to the background, or just replace the value if the opacity is fixed

"linear-gradient( to bottom, var(--div-12) calc(("+{value}+" - 1) * 10000%), transparent calc("+{value}+" * 10000%))"

you can put this also in a style, with a fixed opacity

1 Like