I have a bunch of stuff set up on my pi (RPI 3 for the record), but one of the things I want to run is an RGB LED which is common anode. I have successfully gotten it working by connecting the common anode to the 5V rail (board pin 2) and then connecting the other 3 pins of the LED to 3 separate GPIO pins (GPIO pin 9, 10 and 11) also using resisters. In my code, I set the GPIO pins as outputs and then set them to low when I want the led to turn on. My question is, is it safe to have this connected when the RPI starts up, my code does not run automatically so i just have the pins connected with out telling the RPI what to do with the GPIO pins. The LED lights up softly when the RPI starts so the pi is allowing current into the GPIO pins.
I can provide code if needed. thanks