Google News
logo
p5.js - Interview Questions
How to Using background() with One Argument in p5.js?
When the background() function is called with a numeric argument between 0 and 255, the background color will be set to a grayscale value, with 0 being pure black and 255 being pure white.
function setup(){
  // Sets the background color to white
  background(255);
}
Advertisement