Background pattern generator
Make seamless SVG background patterns (dots, grid, stripes, checker or waves) with your colours and scale.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/pattern-image \
-H 'Content-Type: application/json' \
-d '{"input":{"pattern":"dots"}}'
import json, urllib.request
body = {'input': {'pattern': 'dots'}}
request = urllib.request.Request("https://setget.net/v1/tools/pattern-image", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/pattern-image", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"pattern":"dots"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "pattern-image",
"input": {
"pattern": "dots"
}
}
{
"input": {
"pattern": "dots"
}
}
Endpoint: POST /v1/tools/pattern-image. Over MCP: run_tool with slug: "pattern-image".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
pattern |
string | no | The pattern to draw. One of: dots, grid, stripes, checker, waves. Default: "dots". |
foreground |
string | no | Pattern colour: hex or a basic colour name. Default: "#cbd5e1". |
background |
string | no | Background colour: hex, a basic colour name, or "transparent". Default: "#f8fafc". |
scale |
integer | no | Size of one repeating tile in pixels. Default: 24. From 4 to 400. |
width |
integer | no | Width of the preview image in pixels. Default: 480. From 1 to 4000. |
height |
integer | no | Height of the preview image in pixels. Default: 320. From 1 to 4000. |
Examples
Dots
Input
{
"pattern": "dots"
}Result
Different every time. Press the example button above to see one.
A small checkerboard
Input
{
"pattern": "checker",
"scale": 8,
"width": 16,
"height": 16,
"foreground": "#000",
"background": "#fff"
}Result
{
"svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\"><defs><pattern id=\"sg34c1c6c4\" width=\"8\" height=\"8\" patternUnits=\"userSpaceOnUse\"><path d=\"M0 0h4v4h-4zM4 4h4v4h-4z\" fill=\"#000000\"/></pattern></defs><rect width=\"16\" height=\"16\" fill=\"#ffffff\"/><rect width=\"16\" height=\"16\" fill=\"url(#sg34c1c6c4)\"/></svg>",
"width": 16,
"height": 16,
"tile": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"8\" height=\"8\" viewBox=\"0 0 8 8\"><rect width=\"8\" height=\"8\" fill=\"#ffffff\"/><path d=\"M0 0h4v4h-4zM4 4h4v4h-4z\" fill=\"#000000\"/></svg>"
}Waves on a dark background
Input
{
"pattern": "waves",
"scale": 40,
"foreground": "#2a78d6",
"background": "#0f172a"
}Result
Different every time. Press the example button above to see one.
Questions
- How do I use it as a page background?
- Save the "tile" SVG as a file and set it as a repeating CSS background-image. The tile repeats without visible seams.
Related tools
- Gradient image generatorMake an SVG image filled with a linear or radial gradient from your colour stops, plus the matching CSS.
gradient-image - Placeholder image generatorMake an SVG placeholder image of any size with a centred label, for mock-ups and layouts.
placeholder-image - .gitignore generatorBuild a .gitignore for the languages, editors and operating systems you use, merged without duplicates.
gitignore-generate - ASCII banner text generatorTurn short text into large five-line banner letters for terminals, READMEs, logs and code comments.
ascii-banner - ASCII table generatorRender headers and rows as a box-drawing or plain ASCII table for terminals, logs and code comments.
ascii-table - Barcode generatorMake a Code 128, EAN-13 or UPC-A barcode as SVG, with the check digit worked out or verified for you.
barcode-generate