Script with many options for generating tiles with dots
https://spacecruft.org/livery/omg-dots
- Python 100%
| img | ||
| .gitignore | ||
| .python-version | ||
| LICENSE-apache.txt | ||
| omg-dots.py | ||
| README.md | ||
| requirements-dev.txt | ||
| requirements.txt | ||
OMG Dots!
Script with many options for generating images with dots.
Slop coded, but doesn't use generative AI.
Example
Example image, generated with the following command:
./omg-dots.py --width 8188 --height 15826
This is "shower curtain" sized when printed. This example has been resized.
OMG Dots! Example
A longer example:
./omg-dots.py \
--dot-color "33,16,81" \
--bg-color "199,195,0" \
--dot-sizes '[[3, 15], [5, 25], [8, 20], [12, 10], [35, 0.02]]' \
-o img/yellow-blue.png
Transparency
Colors (background, dot, outline) support transparency via none,
transparent, or an R,G,B,A value where A is 0–255.
Transparent background (dots on a transparent canvas):
./omg-dots.py --bg-color none -o dots-transparent-bg.png
Semi-transparent background:
./omg-dots.py --bg-color "220,20,20,128" -o dots-semi-bg.png
Transparent dots (stencil / mask effect):
./omg-dots.py --dot-color none -o dots-stencil.png
Semi-transparent dots:
./omg-dots.py --dot-color "255,230,0,128" -o dots-semi-dots.png
Help
$ ./omg-dots.py --help
usage: omg-dots.py [-h] [--width WIDTH] [--height HEIGHT] [--dpi DPI]
[--bg-color BG_COLOR] [--dot-color DOT_COLOR]
[--color-variation COLOR_VARIATION] [--dot-sizes DOT_SIZES]
[--fill FILL] [--gap GAP] [--wobble WOBBLE]
[--outline-width OUTLINE_WIDTH]
[--outline-color OUTLINE_COLOR] [--bg-noise BG_NOISE]
[--curves CURVES] [--curve-strength CURVE_STRENGTH]
[--curve-influence CURVE_INFLUENCE] [--output OUTPUT]
[--format {png,svg}] [--seed SEED]
[--compress {0,1,2,3,4,5,6,7,8,9}]
Generate polka dots — densely packed, seamlessly tileable.
options:
-h, --help show this help message and exit
--width, -W WIDTH Image width in pixels (default: 1920)
--height, -H HEIGHT Image height in pixels (default: 1080)
--dpi DPI DPI for mm-to-pixel dot size conversion (default: 200)
--bg-color BG_COLOR Background color as R,G,B or R,G,B,A or 'none' for
transparent (default: (220, 20, 20, 255))
--dot-color DOT_COLOR
Dot color as R,G,B or R,G,B,A or 'none' for
transparent (default: (255, 230, 0, 255))
--color-variation COLOR_VARIATION
Per-dot color variation in HSV (0.0 = uniform, 0.05 =
noticeable) (default: 0.0175)
--dot-sizes DOT_SIZES
Dot size distribution as JSON: '[[diameter_mm,
weight], ...]' (default: [[4, 8], [6, 15], [10, 25],
[15, 25], [22, 15], [28, 8], [38, 3], [50, 0.6], [71,
0.12], [89, 0.03]])
--fill FILL Fill density factor (0.0-1.0, higher = more dots)
(default: 0.45)
--gap GAP Minimum gap between dots in mm (default: 1.0)
--wobble WOBBLE Base wobble amount (0.0 = perfect circles, 0.15 = very
wobbly) (default: 0.08)
--outline-width OUTLINE_WIDTH
Dot outline width in mm (0.0 = no outline) (default:
0.3)
--outline-color OUTLINE_COLOR
Outline color as R,G,B or R,G,B,A or 'none' (default:
auto-darkened dot color) (default: auto)
--bg-noise BG_NOISE Background noise amount in RGB units (0 = flat, 5 =
noticeable) (default: 3)
--curves CURVES Number of bezier curve attractors (0 = uniform random)
(default: 4)
--curve-strength CURVE_STRENGTH
Curve attractor strength (0.0 = no effect, 1.0 =
strong) (default: 0.6)
--curve-influence CURVE_INFLUENCE
Curve influence radius as fraction of min(W,H)
(default: 0.2)
--output, -o OUTPUT Output filename (default: omgdots_WxH.{format})
(default: None)
--format, -f {png,svg}
Output format: png (raster) or svg (vector, no bg-
noise) (default: png)
--seed SEED Random seed for reproducible output (default: None)
--compress {0,1,2,3,4,5,6,7,8,9}
PNG compression level (0=none, 9=max, 1=fast)
(default: 1)
License
Apache 2.0.
Copyright © 2026 Jeff Moe.

