How the generator draws a traditional pattern
Every pattern on this site is built from the same square canvas, a grid of identical cells and five motif routines. These are the exact proportions, stroke widths and colour values the code uses.
A fixed 1000-unit square
Every drawing uses the same canvas: a viewBox of 0 0 1000 1000. Changing the density does not change the canvas size, so the geometry of each motif is expressed as a fraction of its cell rather than in fixed pixels. That is why one file can be printed at 30 mm on a bookmark or enlarged to fill a wall without losing sharpness.
Cell size = 1000 ÷ density Cells on the canvas = density × density
| Density | Cell size (units) | Cells on the canvas | Best for |
|---|---|---|---|
| 4 × 4 | 250 | 16 | Large single motifs, packaging panels |
| 6 × 6 | 166.7 | 36 | The default; posters and book covers |
| 8 × 8 | 125 | 64 | Stationery and small printed pieces |
| 10 × 10 | 100 | 100 | Fine texture and repeating backgrounds |
How each motif is built
Meander (回纹)
The meander is drawn as nested rectangles. The first sits at 12% of the cell from every edge, and the remaining span is divided by 3.4 to set the spacing between rings. Each ring keeps a corner radius of 3% of the cell. At that spacing only two rings are actually drawn: the third works out smaller than the 18% floor, so the loop stops and the centre stays open.
Cloud scroll (云纹)
The cloud head is two half-circles with a radius of 18% of the cell, joined side by side. A shallower arc sits below as the cloud foot: it starts 1.4 radii left of centre and 1.1 radii below it, with a control point a further 0.9 of a radius down. The result is a stylised ruyi head, not a literal cloud drawing.
Water wave
One wave line crosses each cell from edge to edge. It completes one full period inside the cell using quadratic curves, with control points set 14% of the cell above and below the centre line, so the visible crest is roughly half that offset. Because every cell repeats the same phase, neighbouring cells line up into continuous horizontal bands that read as moving water.
Tortoise shell
A single hexagon sits inside each cell with a circumradius of 42% of the cell, rotated so one vertex points up. Repeating it in every cell gives a honeycomb rhythm with a narrow gap between neighbours rather than a continuous lattice.
Diamond (方胜)
The fangsheng motif is two squares rotated 45°, each with a half-side of 26% of the cell, so a side of 52%. The second square is rotated around a point 90% of that half-side towards the top-left corner, so the two outlines overlap instead of sitting concentrically.
Stroke width
Stroke is measured in canvas units, not millimetres: thin is 2, medium is 4 and thick is 7. Since the canvas is 1000 units wide, a stroke of 4 is four thousandths of the full width. At 10 × 10 density a cell is 100 units, so the same stroke covers 4% of the cell; at 4 × 4 the cell is 250 units and the line looks much finer.
| Setting | Stroke width (units) | Share of a cell at 4 × 4 | Share of a cell at 10 × 10 |
|---|---|---|---|
| Thin | 2 | 0.8% | 2% |
| Medium | 4 | 1.6% | 4% |
| Thick | 7 | 2.8% | 7% |
Ink colours and backgrounds
Five ink colours and three backgrounds are offered. All of them are fixed hex values, which means the downloaded SVG carries the exact colour you saw on screen. No colour profile is embedded and nothing is converted on export.
| Ink | Hex value | Character |
|---|---|---|
| Vermilion | #c0392b | Warm and high contrast; the default |
| Indigo | #2c3e6b | Cool and dark; suits both light and dark grounds |
| Ink black | #1f1f1f | Maximum contrast; closest to printed line work |
| Ochre | #9c5b2b | Earthy and low contrast; needs a thicker stroke |
| Jade | #2e7d64 | Mid-tone green; reads best at medium or thick |
The background is transparent by default. Rice paper is #f6f1e4 and dark ink is #20232a. Choosing a background adds a full-canvas rectangle behind the motifs; leaving it transparent keeps an alpha channel in the PNG.
What the export contains
The SVG is written with an explicit xmlns, a width and height of 1000, and the same viewBox, so Illustrator, Figma and Inkscape open it as an editable document rather than a flat image. Each motif is a group translated to its cell, and the stroke colour is written into every shape. The PNG is rasterised at twice the canvas size, which is enough for most moderate print uses.
PNG size = 1000 × 2 = 2000 px per side
Repeating the artwork
The file is one square composition, not a seamless pattern tile. The meander keeps 12% padding inside every cell, and the diamond and hexagon are centred, so placing two exports side by side leaves a visible gutter. To build a repeat, place the SVG in a vector editor and use its pattern tool or duplicate the group along a grid. A true seamless tile needs the spacing adjusted there, not in the generator.
Colour on screen and on paper
The hex values are sRGB. A print shop will convert them to CMYK and the result will shift, especially the vermilion, which lies outside the CMYK gamut and prints duller. Ask for a proof if colour accuracy matters. The generator does not include CMYK conversion, colour profiles or spot colours.
Randomise picks a motif, density, stroke, ink and background independently. One exact combination is therefore one chance in 900.