Enclosure plug-in how to control 3 leds based on other outputs?

Hi all, sorry if it is a silly question.

I want to control an rgb led with 3 raspberry output to indicate different situations (ex: power on, relay 1 on and relay 2 on).

It is possible to make an output value to be dependent on another output value?

Ex relay on pin 21 is on with logic ‘0’ and I want to set pin 20 to logic ‘1’ to turn on led.

Ale