My question is regarding the hookup of a radioshack bright rgb anode led. I have the led common going to a 5v supply and the other pins are going through a 330ohm resistor to 3 PWM output pins (9,10,11 on the Arduino Uno). I set the pinMode() on each pin to OUTPUT, and then I do a "analogWrite(RED_PIN, 255);" and set the other color pins at zero. It should be red, instead it's dark purple. If I do a "digitalWrite(RED_PIN, LOW);" the red led is fully lit. My question is why is the digitalWrite() working and the analogWrite() not? I am new to electronics so excuse me if I used the wrong terminology, I'll do my best to clarify.
Setting the PWM duty cycle to 255 is the opposite of the digital write with low. The duty cycle of 255 means the pin is driven high (5v) 100% of the time. I suspect if you reverse your logic of the Analog writes you will get your intended results.
Just to add some clarification on why the analogWrite did not work as expected. You state the LED's are common anode, and so the RGB pins going to the arduino are negative wires. Therefore, when you write analog 255 (or digital high) to the pin, you are turning off that color to the led - because it is not grounded and the circuit is broken. When you write low to the pin, you are grounding it (sinking it) and the circuit is complete, which turns the LED wire on.