Quadrille.darkSquare

The color of the dark squares of the default chessboard — the one createQuadrille() builds with no arguments, and the one fill() paints with no arguments. Any CSS string or value color() accepts; anything else leaves the previous color in place.

Read it back to build a second board in the same colors, or set it once at startup and let both constructors pick it up.

Example

edit, then run

Note

The other half of the board is Quadrille.lightSquare; FEN positions are drawn over a board built this way, which is why both colors are set before the position is created.

What this page's examples use
p5.quadrille
drawQuadrille createQuadrille cellLength darkSquare
p5.js
createCanvas

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.