xxxxxxxxxx
var colorSlider;
function setup() {
createCanvas(windowWidth, windowHeight);
background(255, 255, 255);
noStroke();
fill(255);
colorSlider = createSlider(0, 360, 100);
//position
colorSlider.position(20, 20);
//change color mode to Hue Saturation and brightness
colorMode(HSB);
//increase line thickness
strokeWeight(10);
}
function draw() {
var h = colorSlider.value();
stroke(h, 255, 255);
blendMode(MULTIPLY);
if(mouseIsPressed) {
var size = random(-30,30);
var x = mouseX+random(-10,10);
var y = mouseY+random(-10,10);
ellipse(x, y, size, size);
}
}