Simple pattern generator
Using binary logic
The background pattern you see is generated by using a temporary canvas element. The image data buffer is modified by making a 32-bits view on it, looping through x and y and applying a small bitwise check.
Pattern generator
Size
Colors
Color 1:
Color 2: