fill(color1, color2)
Fills all cells in the quadrille with a chessboard pattern using the given colors — color1 for the light squares, color2 for the dark — overwriting any current content (the custom-color sibling of fill(), which uses the global Quadrille.lightSquare/Quadrille.darkSquare).
Example
(click or press any key to toggle between filling and clearing the quadrille)
Syntax
fill(color1, color2)
Parameters
| Param | Description |
|---|---|
color1 |
p5.Color | String: The color used for the light squares of the chessboard pattern. Can be a p5.Color instance or an HTML color string (e.g., 'red', '#ff0000', 'rgb(255,0,0)') |
color2 |
p5.Color | String: The color used for the dark squares of the chessboard pattern. Can be a p5.Color instance or an HTML color string |
What this page's examples use
- p5.quadrille
drawQuadrillecreateQuadrillecellLengthfillcleartileDisplay- p5.js
createCanvasbackground
Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.