How to add a listener to ofxColorSlider?

I need to update a model when a colour is selected from the GUI. How can I do that with ofxColorSlider? Or is there another option?

I prefer to use ofParameter instead of ofxColorSlider.

in ofApp.h

ofParameter<ofColor> color;

void updateModel(ofColor&);

ofEventListener colorListener;


void ofApp::setup(){
gui.add(color.set("color",  ofColor(255,0,0,255),  ofColor(0,0,0,0), ofColor(255,255,255,255) ));

colorListener = color.newListener(this, &ofApp::updateModel);

void ofApp::updateModel(ofColor& c){
//update your model 


Thank yoU!