let c = 0; // angle//
let linecolor = 0; // color mode//

function setup() {

  createCanvas(windowWidth, windowHeight);// background size//
  angleMode(DEGREES);
  background(0);// black background//
  lineColor =random(0,255);
  
}

function draw() {
  fill(0, 10);// color background transparent//
  rect(0, 0, width, height);// draw a rect = with and height of the canvas to see the line always move//
  c = c + 5; 

  translate(width / 2, height / 2); // the line is rotated in the centre//
  rotate(c); 
  line(-100, -100, 100, 100);
  stroke(lineColor);
  if (mouseIsPressed) {// conditional//
		lineColor = color(random(0,255), random(0,255), random(0,255));// color is fill random whenever the mouse pressed//
  }

}