Hi, I'm new to controlP5 and am trying to figure out why my slider is only adjusting greyscale and not the color I have inputted. I assume I will have to use the color sliders for this implementation? Thanks
import controlP5.*;
ControlP5 cp5;
int sliderValue2 = 100;
color sliderValue = color(255, 0, 255);
Slider abc;
void setup() {
size(700, 400);
noStroke();
cp5 = new ControlP5(this);
cp5.addSlider("sliderValue2")
.setPosition(width/2 - 100, 50)
.setSize(200, 20)
.setRange(0, 255)
.setNumberOfTickMarks(5)
.setSliderMode(Slider.FLEXIBLE)
;
cp5.addSlider("sliderValue")
.setPosition(width/2 - 100, 150)
.setSize(200, 20)
.setRange(0, 255)
.setNumberOfTickMarks(5)
.setSliderMode(Slider.FLEXIBLE)
;
}
void draw() {
background(sliderValue);
fill(sliderValue2);
rect(0, 0, width, 100);
}