RGB LED help needed

Hello, I'm working on my first Arduino project. I plan on adding 7 pot controlled RGB LEDs to my PC.
I will be using this code that I found a while back:

/*
 RGB LED w/ Potentiometer
 Created 8 May 2010
 Commented by Dave a.k.a Ka0ticstyle

 */

int potpin = A2;		  // POT connected to digital pin 2 - pos/neg are left and right connections on POT
int rpin = 6;		    // Red
int gpin = 5;		   // Green
int bpin = 3;		   // Blue
float h;			   // Hue range
int h_int;			 // Hue color
int r = 0, g = 0, b = 0;	     // Default RGB values

int val = 0;			 // Set POT value to default 0

void h2rgb(float h, int& R, int& G, int& B); // Instantiate h2rgb and it's variables  a.k.a  Hue to RGB

void setup()			  // Run once, when the sketch starts
{
  Serial.begin(9600);	    // Begin the output of data to serial
}


void loop()			   // Run over and over again
{
  val = analogRead(potpin);    // Read the pin and display the value
  h = ((float)val)/1024;	 // Get the range. pot value / 1024
  h_int = (int) 360*h;	   // Get the color hue by multiplying by 360

  h2rgb(h,r,g,b);		  // Call the h2rgb function passing it the hue value

  Serial.print("POT value: ");
  Serial.print(val);	     // Pot value
  Serial.print(" = Hue of ");
  Serial.print(h_int);	   // Color Hue value
  Serial.print(" degrees. RGB values: ");
  Serial.print(r);		 // Red value
  Serial.print(" ");
  Serial.print(g);		 // Green value
  Serial.print(" ");
  Serial.println(b);	     // Blue value

  analogWrite(rpin, r);	  // Changes red led
  analogWrite(gpin, g);	  // Changes green led
  analogWrite(bpin, b);	  // Changes blue led
  
}

void h2rgb(float h, int& R, int& G, int& B) {

  // Used HSV --> RGB function
  // HSV - Hue, Saturation, Value
  // RGB - Red, Green, Blue - example (255,255,255)
  // Function below does a bunch of math to convert HSV values to RGB
  int var_i;
  float S=1, V=1, var_1, var_2, var_3, var_h, var_r, var_g, var_b;

  if ( S == 0 )			     //HSV values = 0 ÷ 1
  {
    R = V * 255;
    G = V * 255;
    B = V * 255;
  }
  else
  {
    var_h = h * 6;
    if ( var_h == 6 ) var_h = 0;	//H must be < 1
    var_i = int( var_h ) ;		//Or ... var_i = floor( var_h )
    var_1 = V * ( 1 - S );
    var_2 = V * ( 1 - S * ( var_h - var_i ) );
    var_3 = V * ( 1 - S * ( 1 - ( var_h - var_i ) ) );

    if	( var_i == 0 ) {
	var_r = V     ;
	var_g = var_3 ;
	var_b = var_1 ;
    }
    else if ( var_i == 1 ) {
	var_r = var_2 ;
	var_g = V     ;
	var_b = var_1 ;
    }
    else if ( var_i == 2 ) {
	var_r = var_1 ;
	var_g = V     ;
	var_b = var_3 ;
    }
    else if ( var_i == 3 ) {
	var_r = var_1 ;
	var_g = var_2 ;
	var_b = V     ;
    }
    else if ( var_i == 4 ) {
	var_r = var_3 ;
	var_g = var_1 ;
	var_b = V     ;
    }
    else			 {
	var_r = V     ;
	var_g = var_1 ;
	var_b = var_2 ;
    }

    R = (1-var_r) * 255;			//RGB results = 0 ÷ 255
    G = (1-var_g) * 255;
    B = (1-var_b) * 255;
  }
}

I plan on wiring it like this:

Questions:
Does everything look alright?
Can the Arduino handle that many LEDs connected to each pin?
Can I power the LEDs with 5v directly from the PC PSU? Since the Arduino will be powered by USB I believe that they'll share ground and this will be fine, but I'm not sure.

Can the Arduino handle that many LEDs connected to each pin?

No. Each pin can handle 40 mA maximum and LED's draw typically 20 mA so even two on a pin would be pushing things.

The code looks OK.

Any ideas as to how I might be able to do it then? I would need 21 pins at 3 pins per LED and 21 pins I don't have.

Look here:
http://arduino.cc/playground/Main/InterfacingWithHardware#Output

Thanks. I found this and adjusted my schematic accordingly. Is it okay now?

Also, the image linked above shows a resistor between the base of the transistor and the digital pin with a value of 1k or 2.2k. What's the difference?

Ether 1 k or 2.2 k should be fine , depends what kind do you have. To calculate more accurate, look here:

Ok, thanks.

I still need help with this bit:

Can I power the LEDs with 5v directly from the PC PSU? Since the Arduino will be powered by USB I believe that they'll share ground and this will be fine, but I'm not sure.

Up to about 400 mA you can draw 5v power from the Arduino connected to USB. You are limited by the maximum power draw for USB.

Between 400 mA and about 1 A (1000 mA) you can draw 5v power from the Arduino +5V pin but you have to supply it with unregulated 7-12v on Vin (or the power jack). You're limited by the current capacity of the Arduino's voltage regulator.

Beyond about 1A you should provide separate power to your circuit. If the power is regulated 5v you can use it to also power the Arduino (via the +5V pin). If the power is between about 7 and 12V (regulated or unregulated) you can use it to also power the Arduino (via the Vin pin or power jack). For other voltages you might need separate power for the Arduino and circuits.

Can I power the LEDs with 5v directly from the PC PSU?

Of course, you can. Ground is common for USB, so you need one wire +5V.

Ok, thanks for the help guys.