Dev TooloraLocal dev tools

> CSS & Design

Mesh Gradient Generator

Layer 3 to 6 seeded radial gradients into a soft mesh background with CSS and an 800x600 SVG, and shuffle it with one slider.

Runs locallyWorks offline
Auto-run
Back to results
Input

Source data

Colors
Output

Result

Live preview

Scrollable stage · no hidden scaling

Waiting for valid CSS…

The swatch fills the stage; translucent colors show the checkerboard behind it. Its size and radius are not exported.

Your result will appear here.

Tool guide

About this tool.

  • CSS has no mesh gradient, but stacking several radial gradients that fade to transparent gives the same soft, blended look. Each color gets one layer centered at its own point, and the background color shows between them.
  • The points are picked from the seed, so the same seed always gives the same picture. Move the seed slider to shuffle the layout without touching the colors.
  • The SVG artifact draws the same picture at 800 by 600. Each layer is a radialGradient whose radii are the square root of two times the farthest-side distance on each axis, which matches the CSS ellipse farthest-corner size.

  • Hero and landing page backgrounds.
  • Cards, banners and social images that need a soft color wash.
  • Replacing a heavy background image with two lines of CSS.
  • Quickly exploring layouts by shuffling the seed.

Pick a Background and the number of Colors, then set each color. The Seed positions the points.

The preview applies exactly the exported declarations. Move the Seed slider to shuffle the layout.

The output is a .mesh rule with a background-color and one radial-gradient layer per color. The first color paints on top.

Copy the CSS or download mesh-gradient.css, the audit report and mesh-gradient.svg. The preview swatch size and radius are not exported.

  • Pastel default (seed 7) → .mesh { background-color: #f8fafc; background-image: radial-gradient(at X% Y%, #f472b6 0px, transparent 50%), … }
  • Five colors (seed 42) → five radial-gradient layers in color order
  • Dark aurora → background-color: #0f172a with cyan, violet and green layers
  • Six colors (seed 2024) → six layers, the first color paints on top
  • Warm sunset → background-color: #fff7ed with orange, pink, yellow and red
  • Seed 8 instead of 7 → the same colors at different positions

  • Colors can be any CSS color; other text is rejected, and a hex color needs its #.
  • Seed is 1 to 9999. Out-of-range values are rejected, never clamped.
  • Positions are whole percentages from 0 to 100.
  • Each layer fades to transparent at 50% with 3 or 4 colors, 40% with 5 and 33% with 6.
  • The SVG is 800 by 600 and uses user-space radial gradients.
  • The same seed and colors always give the same result.

FAQ

Questions about Mesh Gradient Generator

Which color is on top?

The first listed layer paints on top, so the first color is the most visible where layers overlap.

Why does the layout change when I move the seed?

Positions come from the seed. Change the seed to move the points.

Can I use colors other than hex?

Yes. Any CSS color works, for example rgb(59 130 246) or oklch(62% 0.19 260).

How do I get an image?

Download mesh-gradient.svg from the artifacts. It uses plain radialGradient elements and works as an image.

Continue with

CSS Gradient GeneratorBuild linear, radial and conic CSS gradients with 2 to 8 draggable color stops, perceptual interpolation and a live preview.Color MixerMix two CSS colors by weight in sRGB or the perceptual OKLab spaces and get the color-mix() rule with a resolved fallback.Color Scale GeneratorGenerate a Tailwind-style 50 to 950 shade scale from one color, as CSS variables, Tailwind v3 or v4 config or JSON.