priority in logic

priority in logic

Hello, I have a problem that I can't solve
I have Logic
There are more than one input variable
Each variable has priority in color
And I have a variable that represents the state of the connection.
When making a logical equation
I couldn't get the color that represents the connection status