Serial.help()

hay guys, i know this question have been ask as many time as posible yet here i am again. i got this fucntion that i would like to be able to control thru serial,

void SetRGB(int address,int red,int green,int blue)
{
  digitalWrite(slaveSelectPin,LOW);
  SPI.transfer(Red[address]);
  SPI.transfer(red);
  SPI.transfer(Green[address]);
  SPI.transfer(green);
  SPI.transfer(Blue[address]);
  SPI.transfer(blue);
  digitalWrite(slaveSelectPin,HIGH); 
}

what i want to know is how can i get info from the serial for adress,red value(0-255),green(0-255), and blue value(0-255) in that order if i can, but if its easier for not to be sequential its ok ....

the easiest is to send 3 bytes

http://arduino.cc/en/Serial/ReadBytes

how to use Serial.readBytes() there is no example that i could posibbly think how to use it

after trying to understand what it does mean by

Serial.readBytes() reads characters from the serial port into a buffer. The function terminates if the determined length has been read, or it times out

i realize what i mean is something like this?

address=Serial.readBytes(byte,2);
red=Serial.readBytes(byte,3);
green=Serial.readBytes(byte,3);
blue=Serial.readBytes(byte,3);

am i rite to assume this?

sort of

you should plop in a SerialAvailable to see if there is anything in the buffer as well, for example (just ignoring the address for now)

char data[3];

void setup()
{
  Serial.begin(9600); 
}

void loop()
{
  if (Serial.available())
  {
    Serial.readBytes(data, 3);  
    digitalWrite(slaveSelectPin,LOW);
    SPI.transfer(data[0]); // red
    SPI.transfer(data[1]); // green
    SPI.transfer(data[2]); // blue
    digitalWrite(slaveSelectPin,HIGH);
  }
}

each byte is an 8 bit value, repersenting 0-255

what if i want the address to have a value of 0 to 40 and the value of red,green ,and blue is between 0 to 4095

what if i want the address to have a value of 0 to 40 and the value of red,green ,and blue is between 0 to 4095

What if you actually try something, show some code, show some serial output, and describe what happened?

What is sending the serial data? In what format?