

function setup() {
  createCanvas(1000, 1000);
  colorMode(HSB, 360, 100, 100, 100);
  background(200, 30, 23);
  noStroke();
  canvas.style = "position:absolute; left: 50%; width: 800px; margin-left: -400px; margin-top: 200px;";
}

function draw() {

  
  let gradient = drawingContext.createLinearGradient (
    width/2-200, height/2-200, width/2+200, height/2+200);
    
  gradient.addColorStop(0, color(200, 100, 100, 100)); //0 is top left of the gradient
  gradient.addColorStop(1, color(100, 100, 100, 100)); //1 is bottom right

  drawingContext.fillStyle = gradient;

  rect(220, 400, 50, 150, 50);
  rect(320, 400, 50, 50, 50);
  rect(420, 400, 50, 150, 50);
  rect(420, 400, 150, 50, 50);
  rect(620, 400, 50, 150, 50);

}




