Trouble using Vecotrs with ofxGPIO to control LED Strips

Hello forum, I am experiencing some trouble with using C++ vectors and applying them in ofxGPIO in order to control APA102 LED strips. The example that I am basing by code on is based on the example-apa102-ledstrip example. The problem with this example however, is that it only shows how to setup the LED strip with random RGB values. It does not show how to update the values that are passed into the fucntion as vector types.

I am having trouble grasping the way the example structures the vecotrs. From what I understand, colors is an array consisted of vecotrs. But I am having trouble updating these vecotr values so that they can be implemented in a program loop for live manipulation. All I need is a way to clear the array containing rgb vecotor variables and update them with new rgb variables.

So far I am having trouble succeding. Here is my code, with the last one containing an attempt to update the vector values. Please suggest a proper way to update vector values and if there are any ateps I’m ommiting.

Help would be valuesd, thank you in advance!

##offApp.h file

#pragma once
#include "ofMain.h"
#include "ofxGPIO.h"

class ofApp : public ofBaseApp{
    public:
        void setup();
        void update();
        void draw();
        
        void keyPressed(int key);
        void keyReleased(int key);
        void mouseMoved(int x, int y);
        void mouseDragged(int x, int y, int button);
        void mousePressed(int x, int y, int button);
        void mouseReleased(int x, int y, int button);
        void mouseEntered(int x, int y);
        void mouseExited(int x, int y);
        void windowResized(int w, int h);
        void dragEvent(ofDragInfo dragInfo);
        void gotMessage(ofMessage msg);
        
        LED apa;
        vector<ofVec3f> colors;
        int numLed;
};

main.cpp file

#include "ofMain.h"
#include "ofApp.h"

//========================================================================
int main( ){

    ofSetupOpenGL(800,480, OF_WINDOW);            // <-------- setup the GL context

    // this kicks off the running of my app
    // can be OF_WINDOW or OF_FULLSCREEN
    // pass in width and height too:
    ofRunApp( new ofApp());

}


##ofApp.cpp file (problem commented)

#include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){
    numLed=60;
    for(int i = 0; i < numLed; i++) {
            colors.push_back(ofVec3f(
                (int)ofRandom(0,50),
                (int)ofRandom(0,50),
                (int)ofRandom(0,50)
            ));
    }
    apa.setupAPA102();
}

//--------------------------------------------------------------
void ofApp::update(){
    apa.setAPA102(numLed,colors,15);

}

//--------------------------------------------------------------
void ofApp::draw(){
    
    // ERROR 
    // does not allow me to clear the vector
    colors.push_back(numLed);
    
    // ATTEMPT TO UPDATE
    // does not update the LED's on the LED strip
    for(int i = 0; i < numLed; i++) {
        colors.push_back(ofVec3f(
            (int)ofRandom(0,50),
            (int)ofRandom(0,50),
            (int)ofRandom(0,50)
        ));
    }

}

//--------------------------------------------------------------
void ofApp::keyPressed(int key){

}

//--------------------------------------------------------------
void ofApp::keyReleased(int key){

}

//--------------------------------------------------------------
void ofApp::mouseMoved(int x, int y){

}

//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void ofApp::mouseEntered(int x, int y){

}

//--------------------------------------------------------------
void ofApp::mouseExited(int x, int y){

}

//--------------------------------------------------------------
void ofApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void ofApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void ofApp::dragEvent(ofDragInfo dragInfo){ 

}