How to divide digital led strip in different sections?

Hi I’m having some trouble with my digital led strip code.
Until now I can only make the whole led strip blink and change color or just 1 part of the led strip. But for my project I need different parts to light up different colors. For example led 1 to 5 has to be green while led 6 to 8 is blue. Can someone maybe help me out? Thanks!

this is my code now

#include <Adafruit_NeoPixel.h>

#ifdef AVR
#include <avr/power.h>
#endif

#define NUMPIXELS 16

class LEDstrip
{
public:
LEDstrip(int pin);
int r;
int g;
int b;
private:
int _pin;
};

LEDstrip strip1(6);

Adafruit_NeoPixel pixels1 = Adafruit_NeoPixel(NUMPIXELS, 6, NEO_GRB + NEO_KHZ800);

unsigned long TIME;
int var;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
#if defined (AVR_ATtiny85)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
pixels1.begin();
var = 0;
pixels1.show();

}

void loop() {
// put your main code here, to run repeatedly:
TIME = millis();

if (TIME >= 5000) {
var = 1;
}

if (TIME >= 10000) {
var = 2;
}

if (TIME >= 15000) {
var = 3;
}

if (TIME >= 20000) {
var = 4;
}

if (TIME >= 25000) {
var = 5;
}

if (TIME >= 30000) {
var = 6;
}

if (TIME >= 35000){
var = 7;
}

if (TIME >= 40000){
var = 8;
}

if (TIME >= 45000){
var = 9;
}

if (TIME >= 50000){
var = 10;
}

if (TIME >= 55000){
var = 11;
}

if (TIME >= 60000){
var = 12;
}

if (TIME >= 65000){
var = 13;
}

if (TIME >= 70000){
var = 14;
}

if (TIME >= 75000){
var = 15;
}

Serial.println(TIME);
Serial.println(var);

switch (var) {
case 0: { //switched off
}break;

case 1: { //Switches on → white at 52000 we changed!!!
for(int i=0;i<NUMPIXELS;i++){
strip1.r = 155; strip1.g = 155; strip1.b = 155;
}break;
}

case 2: { //Blinks white at 80000
for(int i=0;i<NUMPIXELS;i++){
blinkWhite(200, 200); //first argument is the amount of time to blink, second argument the length of each blink (milliseconds)
}break;
}

case 3: { //switches off at 10000
strip1.r = 0; strip1.g = 0; strip1.b = 0;
}break;

case 4: { // Cyan Blue at 110000
strip1.r = 0; strip1.g = 105; strip1.b = 155;
}break;

case 5: { // darker blue at 138000
strip1.r = 0; strip1.g = 0; strip1.b = 155;
}break;

case 6: { //switches off 152000
strip1.r = 0; strip1.g = 0; strip1.b = 0;
}break;

case 7: { //blinks red at 177000
blinkRed(30000, 500);
}break;

case 8: { //switches on bottom red, top blue at 180000
strip1.r = 155; strip1.g = 0; strip1.b = 0;
}break;

case 9: { // switches off at 186000
strip1.r = 0; strip1.g = 0; strip1.b = 0;
}break;

case 10: { // blinks red-blue at 247000
blinkRedBlue(13000, 750);
}break;

case 11: { // blinks red-yellow at 260000
blinkRedYellow(8000, 750);
}break;

case 12: { // switches on yellow top, white bottom at 276000
strip1.r = 200; strip1.g = 200; strip1.b = 200;
}break;

case 13: { // switches off at 280000
strip1.r = 0; strip1.g = 0; strip1.b = 0;
}break;

case 14: { // switches on final position yellow up, red down at 330000
strip1.r = 155; strip1.g = 0; strip1.b = 0;
}break;

case 15: { // switches off at 343000
strip1.r = 0; strip1.g = 0; strip1.b = 0;
}break;

}
for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(strip1.r,strip1.g,strip1.b));
pixels1.show();

}
}

void blinkWhite(int blinkTime, int blinkSpeed){
int counter = 0;

while(counter <= int(blinkTime/(2*blinkSpeed))){
counter++;
Serial.println(counter);
for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(0,0,0));
pixels1.show();

}
delay(blinkSpeed);

for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(155,155,155));
pixels1.show();

}
delay(blinkSpeed);
}

}

void blinkRedBlue(int blinkTime, int blinkSpeed){
int counter = 0;

while(counter < int(blinkTime/(2*blinkSpeed))){ //blinkspeed : HALF a blink
counter++;
Serial.println(counter);
for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(155,0,0));
pixels1.show();

}
delay(blinkSpeed);
for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(0,0,155));
pixels1.show();

}
delay(blinkSpeed);
}
}

void blinkRed(int blinkTime, int blinkSpeed){
int counter = 0;

while(counter < int(blinkTime/(2*blinkSpeed))){
counter++;
Serial.println(counter);
for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(0,0,0));
pixels1.show();

}
delay(blinkSpeed);
for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(155,0,0));
pixels1.show();

}
delay(blinkSpeed);
}
}

void blinkRedYellow(int blinkTime, int blinkSpeed){
int counter = 0;

while(counter < int(blinkTime/(2*blinkSpeed))){ //blinkspeed : HALF a blink
counter++;
Serial.println(counter);
for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(155,0,0));
pixels1.show();

}
delay(blinkSpeed);
for(int i=0;i<NUMPIXELS;i++){
pixels1.setPixelColor(i, pixels1.Color(200,200,20));
pixels1.show();

}
delay(blinkSpeed);
}
}

void loop() {
  // put your main code here, to run repeatedly:
  TIME = millis();

  if (TIME >= 5000) {
    var = 1;
  }

  if (TIME >= 10000) {
    var = 2;
  }

  if (TIME >= 15000) {
    var = 3;
  }

  if (TIME >= 20000) {
    var = 4;
  }

  if (TIME >= 25000) {
    var = 5;
  }

  if (TIME >= 30000) {
    var = 6;
  }

  if (TIME >= 35000){
    var = 7;
  }

  if (TIME >= 40000){
    var = 8;
  }

  if (TIME >= 45000){
    var = 9;
  }

  if (TIME >= 50000){
    var = 10;
  }

  if (TIME >= 55000){
    var = 11;
  }

  if (TIME >= 60000){
    var = 12;
  }

  if (TIME >= 65000){
    var = 13;
  }

  if (TIME >= 70000){
    var = 14;
  }

  if (TIME >= 75000){
    var = 15;
  }

So, var is TIME/5000, limited to a maximum of 15. You have WAY to much code to determine THAT.

for(int i=0;i<NUMPIXELS;i++){
        strip1.r = 155; strip1.g = 155; strip1.b = 155;
        }break;

NOTHING EVER follows the }. EVER!

Why do you need to assign the SAME values to the same variables 15 times?
Why do you need to assign the SAME values to the same variables 15 times?
Why do you need to assign the SAME values to the same variables 15 times?
Why do you need to assign the SAME values to the same variables 15 times?
Why do you need to assign the SAME values to the same variables 15 times?
Why do you need to assign the SAME values to the same variables 15 times?
Why do you need to assign the SAME values to the same variables 15 times?

What IS the problem? You can iterate over just SOME of the pixels. It is NOT always necessary to iterate from 0 to NUMPIXELS.

What IS that class doing?

Because I want to divide the led strip in 15 different sections which all do something different
What do you mean with iterate from 0 to numpixels?
I thought class is for the rgb colors
I'm not really experienced with arduino or java...

You might want to use the FastLED library and read Multiple Controller Examples · FastLED/FastLED Wiki · GitHub