xxxxxxxxxx
let img;
function preload(){
img=loadImage('./photo.jpg');
}
function setup() {
createCanvas(windowWidth, windowHeight);
img.resize(width,height)
background(0);
}
function draw() {
for(let i=0;i<100;i++);
let x=random(width);
let y=random(height)
let col=img.get(x,y);
let hu =map(hue(col),0,255,2,100);
let sa=map(saturation(col),0,255,2,100);
let br=map(brightness(col),0,255,2,100);
noStroke();
fill(red(col),green(col),blue(col),120);
rect(x,y,br,2);
}