Random Circles Generator
Generate random circles with custom count, size, color modes, opacity, and overlap settings. Export as PNG or SVG instantly.
About
Generative circle compositions underpin everything from data visualization scatter layers to abstract digital art and texture synthesis. The placement algorithm distributes n circles across a canvas of width W and height H, sampling coordinates from a uniform distribution x ∈ [r, W − r] and y ∈ [r, H − r] to keep every circle fully visible. When non-overlap mode is active, each candidate is tested against all previously placed circles using the Euclidean distance condition d > r1 + r2; rejected candidates are re-sampled up to a configurable attempt limit. This rejection sampling approach is O(n2) in the worst case, so extremely dense non-overlap fills will naturally hit the attempt ceiling. The tool does not fake randomness with fixed seeds - each generation pulls from Math.random() and produces a unique composition.
Color modes operate in HSL space because hue rotation in HSL produces perceptually even palettes, unlike raw RGB where random channels skew toward muddy browns. Pastel mode clamps saturation to 50 - 80% and lightness to 70 - 90%. Monochromatic mode locks hue and varies only lightness. Export produces a lossless PNG via Canvas toBlob() or a resolution-independent SVG string. Note: non-overlap mode with high circle counts and large radii on a small canvas will place fewer circles than requested - the tool reports the actual count placed.
Formulas
Each circle is defined by a center coordinate and radius sampled uniformly within the canvas bounds, ensuring the entire circle remains visible:
where W = canvas width, H = canvas height, rmin and rmax = minimum and maximum radius bounds, and rand() returns a value in [0, 1).
Non-overlap collision detection uses Euclidean distance between two circle centers:
Pastel color generation constrains HSL channels to produce soft tones:
where H = hue, S = saturation, L = lightness.
Reference Data
| Color Mode | Hue Range | Saturation | Lightness | Description |
|---|---|---|---|---|
| Random RGB | 0 - 360° | 40 - 100% | 30 - 80% | Full spectrum, vivid, high contrast |
| Pastel | 0 - 360° | 50 - 80% | 70 - 90% | Soft, muted tones suitable for backgrounds |
| Monochromatic | Fixed base hue | 30 - 90% | 40 - 90% | Single hue with lightness/saturation variation |
| Analogous | Base ± 30° | 50 - 90% | 50 - 85% | Harmonious neighboring hues |
| Complementary | Base or Base + 180° | 50 - 90% | 50 - 85% | Opposite hues for maximum contrast |
| Warm | 0 - 60° | 50 - 90% | 55 - 85% | Reds, oranges, yellows |
| Cool | 180 - 270° | 50 - 90% | 55 - 85% | Blues, cyans, teals |
| Grayscale | N/A | 0% | 20 - 90% | Black to white, no chroma |
| Custom Single | User-defined | User-defined | User-defined | All circles use one chosen color |
| Common Canvas Sizes | ||||
| Instagram Post | 1080 × 1080 px | |||
| Twitter Header | 1500 × 500 px | |||
| HD Wallpaper | 1920 × 1080 px | |||
| 4K Wallpaper | 3840 × 2160 px | |||
| A4 Print (300 DPI) | 2480 × 3508 px | |||
| Facebook Cover | 820 × 312 px | |||
| YouTube Thumbnail | 1280 × 720 px | |||