Random SVG Pattern Generator
Generate colorful repeating SVG patterns with customizable shapes, colors, and parameters. Randomize seeds, preview live, and download as PNG.
About
Repeating geometric patterns require precise control over tiling offsets, shape rotation, and color distribution. Errors in gap calculations or seed-driven randomness produce visible seams or unnatural clustering. This tool generates deterministic SVG tile grids using a seeded PRNG (mulberry32), where each cell's hue shift, rotation jitter, and scale variance derive from a single seed value. Colors operate in HSL space for perceptual uniformity. The pattern remains identical for a given seed regardless of regeneration count. Approximation note: per-cell variation is bounded by user-set amplitude parameters, not true stochastic noise.
Export rasterizes the live SVG to a Canvas element at the specified resolution, producing a lossless PNG. Right-click saving is also supported. Pro tip: small gap values with high rotation jitter create dense textile-like effects, while large gaps with uniform rotation produce clean geometric wallpapers.
Formulas
Each cell's pseudo-random value is produced by the mulberry32 algorithm, a fast 32-bit seeded PRNG:
t = imul(t โ (t >>> 15), t | 1)
t = t โ (t + imul(t โ (t >>> 7), t | 61))
result = ((t โ (t >>> 14)) >>> 0) รท 4294967296
Per-cell color is derived by shifting hue:
Where r โ [โ1, 1] from the PRNG, Hbase is the user-set hue (0 - 360ยฐ), and hueJitter is the maximum hue deviation. Cell rotation follows the same pattern:
Where rotJitter is max rotation in degrees. Cell position offset:
Reference Data
| Shape | Vertices | Symmetry Order | Tiles Plane Alone | Best Gap Range | Visual Character |
|---|---|---|---|---|---|
| Circle | โ | โ | No | 2 - 20px | Polka dot, soft |
| Square | 4 | 4 | Yes | 0 - 15px | Grid, rigid |
| Triangle | 3 | 3 | Yes (pairs) | 4 - 18px | Tessellation, dynamic |
| Hexagon | 6 | 6 | Yes | 1 - 10px | Honeycomb, organic |
| Diamond | 4 | 2 | Yes | 2 - 14px | Argyle, classic |
| Star | 10 | 5 | No | 6 - 24px | Festive, ornamental |
| Cross | 12 | 4 | Yes | 3 - 16px | Swiss, medical |
| Pentagon | 5 | 5 | No (Cairo variant) | 4 - 20px | Unusual, eye-catching |
| Octagon | 8 | 8 | No (needs squares) | 2 - 12px | Tile floor, classic |
| Heart | Curve | 1 | No | 6 - 22px | Romantic, playful |
| Arrow | 7 | 1 | No | 4 - 18px | Directional, modern |
| Droplet | Curve | 1 | No | 5 - 20px | Rain, organic |