Problem on my code for RGB Led module. Works only the 3 basic colors

Works only the 3 basic colors red blue green and not work the brightness.

if i use (setColor(80, 0, 80); it is purple but it is GIVEs BLUE COLOR
not work and this
setColor(1, 0, 0); // red lowest brightness
setColor(50, 0, 0); // red
setColor(140, 0, 0); // red
setColor(255, 50, 0); // Orange
setColor(255, 255, 0); // yellow
setColor(80, 0, 80); // purple

look my code pls

#include<Servo.h>
Servo esc;
int hallSensorPin = 2;     
int ledPin =  13;    
int state = 0; 
float R1=30000;
float R2=7500;
int RELAY = 4;
int vroxh = A1;
int lm35Pin = A3;
int redPin = 9;
int greenPin = 10;
int bluePin = 11;
 
 void setup()
{  pinMode(vroxh, INPUT);
   pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);  
   Serial.begin(9600);
   pinMode(ledPin, OUTPUT);      
   pinMode(hallSensorPin, INPUT); 
  esc.attach(6);
  pinMode(RELAY, OUTPUT);
  
  unsigned long _ATimer;
  _ATimer = millis() ;
  while ((millis() - _ATimer) < (3000)) {
      esc.writeMicroseconds(1900); 
  }
  _ATimer = millis() ;
  while ((millis() - _ATimer) < (1000)) {
       esc.writeMicroseconds(900); 
  }
  delay(30);
}
   void setColor(int red, int green, int blue)
{
  analogWrite(redPin, red);
  analogWrite(greenPin, green);
  analogWrite(bluePin, blue);  
}


void loop() {

  static unsigned long DelayTimer;
   int rain = analogRead(vroxh);
  Serial.println(rain);
  int state = digitalRead(hallSensorPin);
  int sensorValue = analogRead(A0);
  float voltage = (5 * sensorValue * (R1 + R2)) / (1024 * R2);
  Serial.println(voltage);
  int aber = analogRead(A2);
  int  amps= (aber - 505) * 78/512;
  Serial.println(amps);
   int analogValue;
 float temperature;
  analogValue= analogRead(lm35Pin);
 temperature = float(analogValue)/1023;
 temperature = temperature*500;
  Serial.print(temperature);
  delay(100);



  if (state == LOW)   
  
  {
    digitalWrite(ledPin, HIGH);
    
    if ((millis() - DelayTimer) >= (4000)) {
      esc.writeMicroseconds(1050);
      digitalWrite(RELAY, HIGH);
    }
  }
  if (state == HIGH)
 
  {
    DelayTimer = millis();
    digitalWrite(ledPin, LOW);
    esc.writeMicroseconds(900);
     digitalWrite(RELAY, LOW);
  }

  if (voltage < 21.00)
  
  {
    digitalWrite(ledPin, LOW);
    while(1) {digitalWrite(RELAY, LOW); 
    esc.writeMicroseconds(900);
    setColor(255, 0, 0);  // red
     }
     }
    
   if  ( temperature > 45.00)
       
      while(1) { digitalWrite(ledPin, LOW);
    esc.writeMicroseconds(900);
    digitalWrite(RELAY, LOW);
    setColor(0, 0, 255);  // blue
  }
 if (rain>100)
   while(1)  { digitalWrite(ledPin, LOW);
    esc.writeMicroseconds(900);
    digitalWrite(RELAY, LOW);
    setColor(80, 0, 80);  // purple  NOT WORK!GIVE BLUE COLOR
   } 
   if (amps>60)
   while(1) 
   {esc.writeMicroseconds(900);
   digitalWrite(RELAY, LOW);
   setColor(0, 255, 0);  // green
   delay(100);
   }}

(deleted)

https://www.arduino.cc/en/Reference/Servo
“On boards other than the Mega, use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins.”

https://www.arduino.cc/en/Reference/AnalogWrite

“On most Arduino boards (those with the ATmega168 or ATmega328), this function works on pins 3, 5, 6, 9, 10, and 11.”

Use pins 3, 5, 6, or 11 for analogWrite() when using the Servo library on an Arduino UNO or other Arduino with an ATmega328P or ATmega168 processor.

Thanks guys