GamutDesk Logo
GamutDesk

Interactive CSS Mesh Gradient Generator

Build a CSS mesh gradient by dragging color points on a canvas. Layered radial-gradient output with adjustable spread and copy-ready code, all in your browser.

Client-Side ArchitecturePrivate Client-Side Processing

Drag a handle to move its color. Keyboard: arrow keys move 1%, Shift + arrow moves 5%.

Base & spread

60%

Color points (4/6)

CSS
background-color: #0F172A;
background-image:
    radial-gradient(at 18% 22%, #7C3AED 0px, transparent 60%),
    radial-gradient(at 82% 18%, #2563EB 0px, transparent 60%),
    radial-gradient(at 70% 82%, #10B981 0px, transparent 60%),
    radial-gradient(at 20% 80%, #F59E0B 0px, transparent 60%);

Technical Specification & Mathematical Principles

How the Mesh Gradient Generator Works

CSS has no native mesh gradient, but stacking several radial-gradient() layers over a background color produces the same soft blended look. Each layer is written radial-gradient(at X% Y%, color 0px, transparent S%), where X and Y position the color point and S controls how far it spreads before fading out.

Layers are painted top to bottom and blend through their transparent regions. Because the output is plain CSS with no images, it scales to any size, weighs a few hundred bytes and can be animated by changing the positions with CSS custom properties.

Frequently Asked Questions

How is this different from a linear gradient?
A linear gradient blends colors along one line. A mesh gradient places colors at independent points so the blend flows in two dimensions, which looks organic and is common in modern hero backgrounds.
Can I animate the mesh?
Yes. Replace the percentages with custom properties registered through @property, then transition or animate them. Keep animation to a small element to protect performance.
Why is there a background color as well?
Radial layers fade to transparent, so the base color shows through gaps. Choosing a base close to your points prevents muddy transitions.

Related Design & Color Instruments