Dimming leds

I need to dim 20 RGB leds with the arduino. Each color is 400mA total for all the leds. I'm new at this and have no idea how to use a transistor. Here's one I found. How do I use this (or another trasistor) to dim these leds? Voltages on the leds are (RGB): (2.0, 3.2, 3.2)V.

Use a ton of resistors? :P

PWM (Pulse Width Modulation) is you friend. Simply use analogWrite() to pulse the power on and off rapidly to your LEDs.

Simply use analogWrite() to pulse the power on and off rapidly to your LEDs.

Or that. But that required PWM pins, and there are only a few on most ATMega chips.

I don't fully understand the project. How do you arrange the leds? How do you group them? I mean, you need to independently control each of the 20 leds, or only each of the 3 colors? Because in each case there is a different problem. In first case you have an output power problem (can use a ULN2803), and in second case, you have a pin count problem (can use a multiplexer).

Tell us...