function getPattern(color1, color2, width) {
const scale = Math.sqrt(2) / 2;
const thisTile = `<rect x=0 y=0 width=${width} height=${width} fill="${color1}" />`;
if (width <= 20) {
return svg`${thisTile}`;
}
return svg`${thisTile}
<g transform="translate(${width / 2}) rotate(45) ">
${getPattern(color2, color1, width * scale)}
</g>`;
}