q5play
    Preparing search index...

    Function fill

    • 💅 Sets the fill color. The default is white.

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

      Parameters

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

      Returns void

      await Canvas(200);
      background(0.8);

      fill('red');
      circle(-20, -20, 80);

      fill('lime');
      square(-20, -20, 80);