Set Color Background given an ALC color

Set Color Background given an ALC color

Hi everyone,

I'm having trouble with the following point.
I have several "line" elements representing electrical sections. These lines have 3 different colours depending on the ALC of the "circuit breaker" type elements placed upstream of the line. Not powered = Grey; powered = Green, earthed = Yellow.

On another synoptic, I'd like to summarise the status of all the sections. I therefore have a "Button" type element for each section, the colour of which varies according to the state of the section. So if the line element is green, my button should be green, if the line is yellow, the button should be yellow and so on.

How can I do this? Finally, the aim is to recover the ALC source of a "Line" type element and transfer it to the fill colour of a button.

Thanks in advance for your help!