Controlling common anode RGB LED with PWM - Can individual colors be done w/o transistors?
As long as each LED in the array uses 20mA or less you can do it directly with the Arduino:







simulate this circuit &ndash; Schematic created using CircuitLab

Note that the blue LED will have a higher forward voltage than the red and green ones, hence the lower resistor.

Also note that the PWM will be inverted. Writing 255 to a channel will switch that LED off, while writing 0 will give it full brightness.