How to make a LED strip one single color

Hello! I'm relatively new to arduino and LED strips. I'm trying to control a LED strip with an IR remote and that is working fine, but the thing I couldn't find anywhere online is how to address every LED the same color. So I've done a different solution, but it would make my life a lot easier if there is another way. Here is my code:

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h>
#endif

#define PIN 10 
#define NUMPIXELS 31
#define DELAYVAL 500
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);


#include <IRremote.h>

const int RECV_PIN = 4;

int togglestate = 0;

IRrecv irrecv(RECV_PIN);
decode_results results;

void setup() {
  irrecv.enableIRIn();

#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif


  pixels.begin();
}

void loop() {
  if (irrecv.decode(&results)){

    switch(results.value){

      case 0xF7C03F: //on

    //ckech red
    if (togglestate==0) {
    pixels.setPixelColor(0, pixels.Color(150, 0, 0));
    pixels.setPixelColor(1, pixels.Color(150, 0, 0));
    pixels.setPixelColor(2, pixels.Color(150, 0, 0));
    pixels.setPixelColor(3, pixels.Color(150, 0, 0));
    pixels.setPixelColor(4, pixels.Color(150, 0, 0));
    pixels.setPixelColor(5, pixels.Color(150, 0, 0));
    pixels.setPixelColor(6, pixels.Color(150, 0, 0));
    pixels.setPixelColor(7, pixels.Color(150, 0, 0));
    pixels.setPixelColor(8, pixels.Color(150, 0, 0));
    pixels.setPixelColor(9, pixels.Color(150, 0, 0));
    pixels.setPixelColor(10, pixels.Color(150, 0, 0));
    pixels.setPixelColor(11, pixels.Color(150, 0, 0));
    pixels.setPixelColor(12, pixels.Color(150, 0, 0));
    pixels.setPixelColor(13, pixels.Color(150, 0, 0));
    pixels.setPixelColor(14, pixels.Color(150, 0, 0));
    pixels.setPixelColor(15, pixels.Color(150, 0, 0));
    pixels.setPixelColor(16, pixels.Color(150, 0, 0));
    pixels.setPixelColor(17, pixels.Color(150, 0, 0));
    pixels.setPixelColor(18, pixels.Color(150, 0, 0));
    pixels.setPixelColor(19, pixels.Color(150, 0, 0));
    pixels.setPixelColor(20, pixels.Color(150, 0, 0));
    pixels.setPixelColor(21, pixels.Color(150, 0, 0));
    pixels.setPixelColor(22, pixels.Color(150, 0, 0));
    pixels.setPixelColor(23, pixels.Color(150, 0, 0));
    pixels.setPixelColor(24, pixels.Color(150, 0, 0));
    pixels.setPixelColor(25, pixels.Color(150, 0, 0));
    pixels.setPixelColor(26, pixels.Color(150, 0, 0));
    pixels.setPixelColor(27, pixels.Color(150, 0, 0));
    pixels.setPixelColor(28, pixels.Color(150, 0, 0));
    pixels.setPixelColor(29, pixels.Color(150, 0, 0));
    pixels.setPixelColor(30, pixels.Color(150, 0, 0));
    pixels.show();

    //check green
    } else if (togglestate==1) {
    pixels.setPixelColor(0, pixels.Color(0, 150, 0));
    pixels.setPixelColor(1, pixels.Color(0, 150, 0));
    pixels.setPixelColor(2, pixels.Color(0, 150, 0));
    pixels.setPixelColor(3, pixels.Color(0, 150, 0));
    pixels.setPixelColor(4, pixels.Color(0, 150, 0));
    pixels.setPixelColor(5, pixels.Color(0, 150, 0));
    pixels.setPixelColor(6, pixels.Color(0, 150, 0));
    pixels.setPixelColor(7, pixels.Color(0, 150, 0));
    pixels.setPixelColor(8, pixels.Color(0, 150, 0));
    pixels.setPixelColor(9, pixels.Color(0, 150, 0));
    pixels.setPixelColor(10, pixels.Color(0, 150, 0));
    pixels.setPixelColor(11, pixels.Color(0, 150, 0));
    pixels.setPixelColor(12, pixels.Color(0, 150, 0));
    pixels.setPixelColor(13, pixels.Color(0, 150, 0));
    pixels.setPixelColor(14, pixels.Color(0, 150, 0));
    pixels.setPixelColor(15, pixels.Color(0, 150, 0));
    pixels.setPixelColor(16, pixels.Color(0, 150, 0));
    pixels.setPixelColor(17, pixels.Color(0, 150, 0));
    pixels.setPixelColor(18, pixels.Color(0, 150, 0));
    pixels.setPixelColor(19, pixels.Color(0, 150, 0));
    pixels.setPixelColor(20, pixels.Color(0, 150, 0));
    pixels.setPixelColor(21, pixels.Color(0, 150, 0));
    pixels.setPixelColor(22, pixels.Color(0, 150, 0));
    pixels.setPixelColor(23, pixels.Color(0, 150, 0));
    pixels.setPixelColor(24, pixels.Color(0, 150, 0));
    pixels.setPixelColor(25, pixels.Color(0, 150, 0));
    pixels.setPixelColor(26, pixels.Color(0, 150, 0));
    pixels.setPixelColor(27, pixels.Color(0, 150, 0));
    pixels.setPixelColor(28, pixels.Color(0, 150, 0));
    pixels.setPixelColor(29, pixels.Color(0, 150, 0));
    pixels.setPixelColor(30, pixels.Color(0, 150, 0));
    pixels.show();

    //check blue
    } else if (togglestate==2){
    pixels.setPixelColor(0, pixels.Color(0, 0, 150));
    pixels.setPixelColor(1, pixels.Color(0, 0, 150));
    pixels.setPixelColor(2, pixels.Color(0, 0, 150));
    pixels.setPixelColor(3, pixels.Color(0, 0, 150));
    pixels.setPixelColor(4, pixels.Color(0, 0, 150));
    pixels.setPixelColor(5, pixels.Color(0, 0, 150));
    pixels.setPixelColor(6, pixels.Color(0, 0, 150));
    pixels.setPixelColor(7, pixels.Color(0, 0, 150));
    pixels.setPixelColor(8, pixels.Color(0, 0, 150));
    pixels.setPixelColor(9, pixels.Color(0, 0, 150));
    pixels.setPixelColor(10, pixels.Color(0, 0, 150));
    pixels.setPixelColor(11, pixels.Color(0, 0, 150));
    pixels.setPixelColor(12, pixels.Color(0, 0, 150));
    pixels.setPixelColor(13, pixels.Color(0, 0, 150));
    pixels.setPixelColor(14, pixels.Color(0, 0, 150));
    pixels.setPixelColor(15, pixels.Color(0, 0, 150));
    pixels.setPixelColor(16, pixels.Color(0, 0, 150));
    pixels.setPixelColor(17, pixels.Color(0, 0, 150));
    pixels.setPixelColor(18, pixels.Color(0, 0, 150));
    pixels.setPixelColor(19, pixels.Color(0, 0, 150));
    pixels.setPixelColor(20, pixels.Color(0, 0, 150));
    pixels.setPixelColor(21, pixels.Color(0, 0, 150));
    pixels.setPixelColor(22, pixels.Color(0, 0, 150));
    pixels.setPixelColor(23, pixels.Color(0, 0, 150));
    pixels.setPixelColor(24, pixels.Color(0, 0, 150));
    pixels.setPixelColor(25, pixels.Color(0, 0, 150));
    pixels.setPixelColor(26, pixels.Color(0, 0, 150));
    pixels.setPixelColor(27, pixels.Color(0, 0, 150));
    pixels.setPixelColor(28, pixels.Color(0, 0, 150));
    pixels.setPixelColor(29, pixels.Color(0, 0, 150));
    pixels.setPixelColor(30, pixels.Color(0, 0, 150));
    pixels.show();      
    }
    break;

      case 0xF740BF: //off
    pixels.setPixelColor(0, pixels.Color(0, 0, 0));
    pixels.setPixelColor(1, pixels.Color(0, 0, 0));
    pixels.setPixelColor(2, pixels.Color(0, 0, 0));
    pixels.setPixelColor(3, pixels.Color(0, 0, 0));
    pixels.setPixelColor(4, pixels.Color(0, 0, 0));
    pixels.setPixelColor(5, pixels.Color(0, 0, 0));
    pixels.setPixelColor(6, pixels.Color(0, 0, 0));
    pixels.setPixelColor(7, pixels.Color(0, 0, 0));
    pixels.setPixelColor(8, pixels.Color(0, 0, 0));
    pixels.setPixelColor(9, pixels.Color(0, 0, 0));
    pixels.setPixelColor(10, pixels.Color(0, 0, 0));
    pixels.setPixelColor(11, pixels.Color(0, 0, 0));
    pixels.setPixelColor(12, pixels.Color(0, 0, 0));
    pixels.setPixelColor(13, pixels.Color(0, 0, 0));
    pixels.setPixelColor(14, pixels.Color(0, 0, 0));
    pixels.setPixelColor(15, pixels.Color(0, 0, 0));
    pixels.setPixelColor(16, pixels.Color(0, 0, 0));
    pixels.setPixelColor(17, pixels.Color(0, 0, 0));
    pixels.setPixelColor(18, pixels.Color(0, 0, 0));
    pixels.setPixelColor(19, pixels.Color(0, 0, 0));
    pixels.setPixelColor(20, pixels.Color(0, 0, 0));
    pixels.setPixelColor(21, pixels.Color(0, 0, 0));
    pixels.setPixelColor(22, pixels.Color(0, 0, 0));
    pixels.setPixelColor(23, pixels.Color(0, 0, 0));
    pixels.setPixelColor(24, pixels.Color(0, 0, 0));
    pixels.setPixelColor(25, pixels.Color(0, 0, 0));
    pixels.setPixelColor(26, pixels.Color(0, 0, 0));
    pixels.setPixelColor(27, pixels.Color(0, 0, 0));
    pixels.setPixelColor(28, pixels.Color(0, 0, 0));
    pixels.setPixelColor(29, pixels.Color(0, 0, 0));
    pixels.setPixelColor(30, pixels.Color(0, 0, 0));
    pixels.show();
    break;
      
      case 0xF720DF: //red
    togglestate = 0;
    pixels.setPixelColor(0, pixels.Color(150, 0, 0));
    pixels.setPixelColor(1, pixels.Color(150, 0, 0));
    pixels.setPixelColor(2, pixels.Color(150, 0, 0));
    pixels.setPixelColor(3, pixels.Color(150, 0, 0));
    pixels.setPixelColor(4, pixels.Color(150, 0, 0));
    pixels.setPixelColor(5, pixels.Color(150, 0, 0));
    pixels.setPixelColor(6, pixels.Color(150, 0, 0));
    pixels.setPixelColor(7, pixels.Color(150, 0, 0));
    pixels.setPixelColor(8, pixels.Color(150, 0, 0));
    pixels.setPixelColor(9, pixels.Color(150, 0, 0));
    pixels.setPixelColor(10, pixels.Color(150, 0, 0));
    pixels.setPixelColor(11, pixels.Color(150, 0, 0));
    pixels.setPixelColor(12, pixels.Color(150, 0, 0));
    pixels.setPixelColor(13, pixels.Color(150, 0, 0));
    pixels.setPixelColor(14, pixels.Color(150, 0, 0));
    pixels.setPixelColor(15, pixels.Color(150, 0, 0));
    pixels.setPixelColor(16, pixels.Color(150, 0, 0));
    pixels.setPixelColor(17, pixels.Color(150, 0, 0));
    pixels.setPixelColor(18, pixels.Color(150, 0, 0));
    pixels.setPixelColor(19, pixels.Color(150, 0, 0));
    pixels.setPixelColor(20, pixels.Color(150, 0, 0));
    pixels.setPixelColor(21, pixels.Color(150, 0, 0));
    pixels.setPixelColor(22, pixels.Color(150, 0, 0));
    pixels.setPixelColor(23, pixels.Color(150, 0, 0));
    pixels.setPixelColor(24, pixels.Color(150, 0, 0));
    pixels.setPixelColor(25, pixels.Color(150, 0, 0));
    pixels.setPixelColor(26, pixels.Color(150, 0, 0));
    pixels.setPixelColor(27, pixels.Color(150, 0, 0));
    pixels.setPixelColor(28, pixels.Color(150, 0, 0));
    pixels.setPixelColor(29, pixels.Color(150, 0, 0));
    pixels.setPixelColor(30, pixels.Color(150, 0, 0));
    pixels.show();
    break;

      case 0xF7A05F: //green
      togglestate = 1;
    pixels.setPixelColor(0, pixels.Color(0, 150, 0));
    pixels.setPixelColor(1, pixels.Color(0, 150, 0));
    pixels.setPixelColor(2, pixels.Color(0, 150, 0));
    pixels.setPixelColor(3, pixels.Color(0, 150, 0));
    pixels.setPixelColor(4, pixels.Color(0, 150, 0));
    pixels.setPixelColor(5, pixels.Color(0, 150, 0));
    pixels.setPixelColor(6, pixels.Color(0, 150, 0));
    pixels.setPixelColor(7, pixels.Color(0, 150, 0));
    pixels.setPixelColor(8, pixels.Color(0, 150, 0));
    pixels.setPixelColor(9, pixels.Color(0, 150, 0));
    pixels.setPixelColor(10, pixels.Color(0, 150, 0));
    pixels.setPixelColor(11, pixels.Color(0, 150, 0));
    pixels.setPixelColor(12, pixels.Color(0, 150, 0));
    pixels.setPixelColor(13, pixels.Color(0, 150, 0));
    pixels.setPixelColor(14, pixels.Color(0, 150, 0));
    pixels.setPixelColor(15, pixels.Color(0, 150, 0));
    pixels.setPixelColor(16, pixels.Color(0, 150, 0));
    pixels.setPixelColor(17, pixels.Color(0, 150, 0));
    pixels.setPixelColor(18, pixels.Color(0, 150, 0));
    pixels.setPixelColor(19, pixels.Color(0, 150, 0));
    pixels.setPixelColor(20, pixels.Color(0, 150, 0));
    pixels.setPixelColor(21, pixels.Color(0, 150, 0));
    pixels.setPixelColor(22, pixels.Color(0, 150, 0));
    pixels.setPixelColor(23, pixels.Color(0, 150, 0));
    pixels.setPixelColor(24, pixels.Color(0, 150, 0));
    pixels.setPixelColor(25, pixels.Color(0, 150, 0));
    pixels.setPixelColor(26, pixels.Color(0, 150, 0));
    pixels.setPixelColor(27, pixels.Color(0, 150, 0));
    pixels.setPixelColor(28, pixels.Color(0, 150, 0));
    pixels.setPixelColor(29, pixels.Color(0, 150, 0));
    pixels.setPixelColor(30, pixels.Color(0, 150, 0));
    pixels.show();
    break;

      case 0xF7609F: //blue
      togglestate = 2;
    pixels.setPixelColor(0, pixels.Color(0, 0, 150));
    pixels.setPixelColor(1, pixels.Color(0, 0, 150));
    pixels.setPixelColor(2, pixels.Color(0, 0, 150));
    pixels.setPixelColor(3, pixels.Color(0, 0, 150));
    pixels.setPixelColor(4, pixels.Color(0, 0, 150));
    pixels.setPixelColor(5, pixels.Color(0, 0, 150));
    pixels.setPixelColor(6, pixels.Color(0, 0, 150));
    pixels.setPixelColor(7, pixels.Color(0, 0, 150));
    pixels.setPixelColor(8, pixels.Color(0, 0, 150));
    pixels.setPixelColor(9, pixels.Color(0, 0, 150));
    pixels.setPixelColor(10, pixels.Color(0, 0, 150));
    pixels.setPixelColor(11, pixels.Color(0, 0, 150));
    pixels.setPixelColor(12, pixels.Color(0, 0, 150));
    pixels.setPixelColor(13, pixels.Color(0, 0, 150));
    pixels.setPixelColor(14, pixels.Color(0, 0, 150));
    pixels.setPixelColor(15, pixels.Color(0, 0, 150));
    pixels.setPixelColor(16, pixels.Color(0, 0, 150));
    pixels.setPixelColor(17, pixels.Color(0, 0, 150));
    pixels.setPixelColor(18, pixels.Color(0, 0, 150));
    pixels.setPixelColor(19, pixels.Color(0, 0, 150));
    pixels.setPixelColor(20, pixels.Color(0, 0, 150));
    pixels.setPixelColor(21, pixels.Color(0, 0, 150));
    pixels.setPixelColor(22, pixels.Color(0, 0, 150));
    pixels.setPixelColor(23, pixels.Color(0, 0, 150));
    pixels.setPixelColor(24, pixels.Color(0, 0, 150));
    pixels.setPixelColor(25, pixels.Color(0, 0, 150));
    pixels.setPixelColor(26, pixels.Color(0, 0, 150));
    pixels.setPixelColor(27, pixels.Color(0, 0, 150));
    pixels.setPixelColor(28, pixels.Color(0, 0, 150));
    pixels.setPixelColor(29, pixels.Color(0, 0, 150));
    pixels.setPixelColor(30, pixels.Color(0, 0, 150));
    pixels.show();  
    break;
    
  }
  irrecv.resume();
}
}
     pixels.setPixelColor(0, pixels.Color(150, 0, 0));
    pixels.setPixelColor(1, pixels.Color(150, 0, 0));
    pixels.setPixelColor(2, pixels.Color(150, 0, 0));
    pixels.setPixelColor(3, pixels.Color(150, 0, 0));
    pixels.setPixelColor(4, pixels.Color(150, 0, 0));
    pixels.setPixelColor(5, pixels.Color(150, 0, 0));
    pixels.setPixelColor(6, pixels.Color(150, 0, 0));
    pixels.setPixelColor(7, pixels.Color(150, 0, 0));
    pixels.setPixelColor(8, pixels.Color(150, 0, 0));
etc

Do you see all those numbers lthat increase by 1 for each pixel ? Well, not surprisingly there is a way to make a variable increase by one as many times as as you like, it is called a for loop

for (int count = 0; count < 9; count = count + 1) 
{
  pixels.setPixelColor(count, pixels.Color(150, 0, 0));
}

try it for yourself

You could also use the NeoPixel fill() function.

pixels.fill(pixels.Color(0, 150, 0), 0, 30);

The Wokwi simulation has different numbers than your remote control.
However, I made your project in Wokwi anyway with the 'pixels.fill' as mentioned by ToddL1962 and using the numbers on the remote control of 1,2,3,4,5 : https://wokwi.com/arduino/projects/308657055788433985

Thanks!