How I'm communicating with Serial.available() == 3 and how to run my fade effect

I’ve got it from github repo a functionality of changing rgb led strip colors and it works but not sure how this Serial.available == 3 works with visual studio and how to make my fade effect work if I call it and how to make the fade effect to work with the color set and here is my code in arduino:

const int RED_LED_PIN = 9;
const int GREEN_LED_PIN = 10;
const int BLUE_LED_PIN = 11;

const int brightnessOff = 0;
int brightness = 0;
int fadeAmount = 5;
String val;

void setup() {
Serial.begin(9600);
val = “FadeOff”;
}

void loop() {

if (Serial.available() == 3)
{
analogWrite(RED_LED_PIN, Serial.read());
analogWrite(GREEN_LED_PIN, Serial.read());
analogWrite(BLUE_LED_PIN, Serial.read());
}

if(val == “FadeOn”)
{
analogWrite(RED_LED_PIN, brightness);
analogWrite(GREEN_LED_PIN, brightness);
analogWrite(BLUE_LED_PIN, brightness);

brightness = brightness + fadeAmount;

if(brightness <= 0 || brightness >= 255)
{
fadeAmount = -fadeAmount;
}

delay(30);
}
else if(val == “FadeOff”)
{
analogWrite(RED_LED_PIN, brightnessOff);
analogWrite(GREEN_LED_PIN, brightnessOff);
analogWrite(BLUE_LED_PIN, brightnessOff);
}

}