Car RPM to RGB lighting

Hello guys. First at all i dont know how to write the codes :smiley: but i got an idea. I want to make my dashboard backlight rgb. The colors may change as the rpm gets higher for example :
0 -1500=cyan
1500-3000=blue
3000-4500=green
4500-6000=yellow
6000-6500=magenta
6500-9000=red

i just want to know that is it possible to make this? If yes, can somebody please help me make this project? <3

Actually getting the RPM is the hard part. From there the code is really pretty simple. What make and year is your car? Can you access a tach signal?

Here is a simple sketch to illustrate the logic to select a color based on RPM per your table.

void setup()
{
   Serial.begin(115200);
   Serial.println("Enter an RPM, 0 to 9000");
}

void loop()
{
  if(Serial.available())
  {
    int rpm = Serial.parseInt();
    Serial.print("RPM  ");
    Serial.print(rpm);
    Serial.print("  COLOR  ");
    switch(rpm)
    {
      case 0 ... 1500:
      Serial.print("Cyan");
      break;
      case 1501 ... 3000:
      Serial.print("Blue");
      break;
      case 3001 ... 4500:
      Serial.print("Green");
      break;
      case 4501 ... 6000:
      Serial.print("Yellow");
      break;
      case 6001 ... 6500:
      Serial.print("Magenta");
      break;
      case 6501 ... 9000:
      Serial.print("Red");
      break;
      default:
      Serial.print("Out of range");      
    }
    Serial.println();
  }
}

This is a cool idea. Just commenting so I can follow