Button-card how copy/reference a value into another field

Hello together,

I have the following problem with my custom-button card.

Like in all the default tile cards. I’m displaying an icon and want to slightly color the round background in the same color.

Use case should be like this, I set a static color for the icon (later maybe dynamic) and img_cell background-color should automaticity get the same color with 20% visibility.

That’s my current code:

How can I access the color of the icon, when I’m setting the background-color and can get a reference, because this part should also go into the template?

I already tried to set the var(–icon-primary-color,currentcolor) which contains the color, but it’s not available in the HTML on this level :frowning: