Atelier

AtelierField

Drawings that cover the area they are given.

Generate procedural SVG drawings for a chosen width and height. Field offers eighteen motifs, from layered landscapes to contours and halftones. Each drawing can stand alone or become part of an existing SVG document.

Six wave layers, generated for a 1200 × 400 area with seed 7. One colour, with opacity varying by layer.

Features

  • Draw for a specific area
    Choose the dimensions and motif. Some drawings fill the frame; others leave transparent space.
  • Repeat a result with a seed
    Seeded factories reproduce the same drawing for the same parameters and package version.
  • Use SVG or CSS
    Export SVG, append a group to a document, or use the drawing as a CSS background.

Cover an area

use Atelier\Field\Field;

echo Field::waves(1200, 400, layers: 6, seed: 7)
    ->withColor('#0067a0')
    ->toSvg();

Browse the eighteen illustrated fields to choose a motif and see how its parameters change the result.

A field is generated for a particular area. To repeat one tile across shapes of any size, use Pattern.

Set the colours

use Atelier\Field\Field;
use Atelier\Field\Theme;

echo Field::waves(1200, 400)
    ->withTheme(Theme::blueprint())
    ->withBackground('#f6f5f1')
    ->withOpacity(0.6)
    ->toSvg();

Style methods return a new field. The default foreground is currentColor and the background is transparent. Themes can give individual layers different colours.

Use a drawing as a background

use Atelier\Field\Field;

echo Field::waves(1200, 400, seed: 7)->withColor('#0067a0')->toCss();

See Getting started for document composition, input validation, and viewport limits.

Source and requirements

Requires PHP 8.3 or later and Atelier SVG.

View Field on GitHub.