Need help with a Neopixel project

So I'm trying to make a "volume" control by turning a pot, resulting in a Neopixel strip lighting up and down from blue to red, I made the pixels light up in one color (blue) but I don't know how to map colors from blue to red across the led's, so that it starts blue, and end in red with smooth transition between the colors.

My code so far:

#include <Adafruit_NeoPixel.h>
#include <avr/power.h>

#define PIN 6

int const potPin = A0;  //potentiometer input
int potVal; //variable to store the input from the potentiometer
int number; //variable to store number of LED's

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)

Adafruit_NeoPixel strip = Adafruit_NeoPixel(9, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  Serial.begin(9600);
  strip.begin(); // Start LED Strip
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {

uint8_t ledPin[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  
uint32_t color = strip.Color(0, 0, 200);

potVal = analogRead(potPin);

for (int i = 0; i < 9; i++) {
  if( potVal < 20 ) { strip.setPixelColor(ledPin[0], color);}
  
else
  {strip.setPixelColor(ledPin[0], 0);}
  if( (i * 116) > potVal) { strip.setPixelColor(ledPin[i], color);}
  
else
  { strip.setPixelColor(ledPin[i], 0);}
  strip.show();
  }
}

As you can see I have only the blue color right now.

Your for loop only accesses 9 of the 10 elements in the ledPin array.

ledPin is a terrible name for an array that has nothing to do win actual pins.

You do not even need an array when your index is exactly the same as the array contents. i.e. ledPIn[3] is 3 -- just use the index by itself.

You have made no attempt at fading at all. Post code with some effort shown to that end and you will get some help.

Also format your code a little bit:

#include <Adafruit_NeoPixel.h>
#include <avr/power.h>

#define PIN 6

int const potPin = A0;  //potentiometer input
int potVal;             //variable to store the input from the potentiometer
int number;             //variable to store number of LED's

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number ( most are valid )
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream ( most NeoPixel products w/WS2812 LEDs )
//   NEO_GRB     Pixels are wired for GRB bitstream ( most NeoPixel products )

Adafruit_NeoPixel strip = Adafruit_NeoPixel( 9, PIN, NEO_GRB + NEO_KHZ800 );

void setup( ) {
    Serial.begin( 9600 );
    strip.begin( );         // Start LED Strip
    strip.show( );          // Initialize all pixels to 'off'
}

void loop( ) {
    uint8_t ledPin[ ] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    uint32_t color = strip.Color( 0, 0, 200 );

    potVal = analogRead( potPin );

    for( int i = 0; i < 9; i++ ) {
        if( potVal < 20  )
            strip.setPixelColor( ledPin[0], color );
        else
            strip.setPixelColor( ledPin[0], 0 );

        if( (i * 116) > potVal )
            strip.setPixelColor( ledPin[i], color );
        else
            strip.setPixelColor( ledPin[i], 0 );

        strip.show( );
    }
}

boolrules:
Your for loop only accesses 9 of the 10 elements in the ledPin array.

ledPin is a terrible name for an array that has nothing to do win actual pins.

You do not even need an array when your index is exactly the same as the array contents. i.e. ledPIn[3] is 3 -- just use the index by itself.

You have made no attempt at fading at all. Post code with some effort shown to that end and you will get some help.

Also format your code a little bit:

#include <Adafruit_NeoPixel.h>

#include <avr/power.h>

#define PIN 6

int const potPin = A0;  //potentiometer input
int potVal;            //variable to store the input from the potentiometer
int number;            //variable to store number of LED's

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number ( most are valid )
// Parameter 3 = pixel type flags, add together as needed:
//  NEO_KHZ800  800 KHz bitstream ( most NeoPixel products w/WS2812 LEDs )
//  NEO_GRB    Pixels are wired for GRB bitstream ( most NeoPixel products )

Adafruit_NeoPixel strip = Adafruit_NeoPixel( 9, PIN, NEO_GRB + NEO_KHZ800 );

void setup( ) {
    Serial.begin( 9600 );
    strip.begin( );        // Start LED Strip
    strip.show( );          // Initialize all pixels to 'off'
}

void loop( ) {
    uint8_t ledPin[ ] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    uint32_t color = strip.Color( 0, 0, 200 );

potVal = analogRead( potPin );

for( int i = 0; i < 9; i++ ) {
        if( potVal < 20  )
            strip.setPixelColor( ledPin[0], color );
        else
            strip.setPixelColor( ledPin[0], 0 );

if( (i * 116) > potVal )
            strip.setPixelColor( ledPin[i], color );
        else
            strip.setPixelColor( ledPin[i], 0 );

strip.show( );
    }
}

Well, I'm sorry I dont know how to do, what I want do.. Which I also clearly stated in my last post.

I'm completely new, and had hoped for some pointers, but I'll refrain from posting again...