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

      • color: string | number | Color

        fill color

      Returns void

      await Canvas(200);
      background(0.8);

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

      fill('lime');
      square(-20, -20, 80);
    • 💅 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
      • Optionalc1: number
      • Optionalc2: number
      • Optionalc3: number

      Returns void