Google News
logo
p5.js - Interview Questions
What is the background() Function in p5.js?
The background() function sets the background color of the p5.js canvas. The background of a p5.js canvas is transparent by default.
 
function setup(){
  // Sets background to a gray color
  background(127);
}
Advertisement