How to see if LED is on

I am using a RGB LED. I would want to find out if I can read if the LED is already on without using analogread/digitalread for each pin as I need to connect two to three RGB LEDs on a Arduino Uno and use a IR controller so that a button is the master switch for turning on/off the led

I'm not sure what you want to do. But with digitalRead() you can check the state of a pin, even if that's an output.

Wouldn't it be easier to use a variable to hold the state?

Turn on a pin, pinFlag = true.

Turn off the pin, pinFlag = false.

Weedpharma

weedpharma:
Wouldn't it be easier to use a variable to hold the state?

yes, I know it is on because I left it on!