q5play
    Preparing search index...

    Function background

    • 🎨 Draws over the entire canvas with a color or image.

      Like the color function, this function can accept colors in a wide range of formats: CSS color string, grayscale value, and color component values.

      Parameters

      • c0: number
      • c1: number
      • c2: number
      • c3: number

      Returns void

      await Canvas(200, 100);
      background('crimson');
      q5.draw = function () {
      background(0.5, 0.2);
      circle(mouseX, mouseY, 20);
      };