Skip to content

Function: randomFill() ​

ts
function randomFill(colors, seed?): CellFill;

A random color per cell. The choice depends only on the cell's id and seed, so a tile keeps its color when the layout is resized or the region changes.

Parameters ​

ParameterTypeDefault value
colorsreadonly string[]undefined
seednumber1

Returns ​

CellFill

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).