StealThis .dev

Comics — Halftone / Ben-Day Dot Backgrounds

A comic-book halftone toolkit built entirely from CSS radial-gradients. Six live swatches show flat Ben-Day dots, a density gradient ramp for shading, a radial impact burst, diagonal speed-lines, and a two-color duotone screen, all framed in thick ink borders on halftone paper. A large preview panel carries a speech balloon and bold SFX while range sliders for dot size, spacing, and angle plus dot and paper color pickers update CSS variables in real time, and a copy CSS button drops the generated background-image rule onto the clipboard with a toast.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Halftone / Ben-Day Dot Backgrounds

A self-contained halftone foundry for comic-style interfaces. The workbench pairs a large preview panel — filled with a live Ben-Day dot field, a tailed speech balloon reading Neon Ronin #07 and an oversized POW SFX — with a control deck. Range sliders for dot size, spacing, and angle write straight to CSS custom properties, so the dot grid reflows the instant you drag, and color pickers swap the dot ink and paper hues independently.

Below the bench, a swatch gallery showcases six reusable patterns assembled purely from CSS radial-gradient and repeating-linear-gradient: a flat Ben-Day grid, a density gradient ramp for shading, a radial impact burst, diagonal speed-lines, a two-color duotone screen, and a “Your Mix” tile that mirrors the workbench live. Each card sits in a thick ink border with a hard drop-shadow and lifts on hover and keyboard focus.

The Copy CSS button serializes the current dot field into a ready-to-paste background-image rule and copies it to the clipboard (with a navigator.clipboard path and a document.execCommand fallback), confirming with a small toast(). Quick presets — flat dots, a fine screen, and a bold pulp mix — reset every control at once. No frameworks, no build step: just Bangers and Inter over vanilla CSS and JS.

Illustrative UI only — fictional series, characters, and data.