🌈 Mesh Gradient Generator
Create stunning mesh gradient backgrounds with draggable color points, 12 presets, and one-click export to PNG, CSS, and SVG. Free mesh gradient generator.
How to Use
Pick a preset or start fresh
Choose one of 12 built-in presets from the dropdown, or click + Add Point to place your own color points.
Drag and recolor
Click any circle to select it, drag to move it. Use the color picker or hex input to change its color. The gradient updates live.
Export
PNG downloads the canvas at full resolution. CSS gives you copy-ready radial-gradient code. SVG exports a scalable vector version.
Frequently Asked Questions
Complete Guide: Mesh Gradient Generator
What Is a Mesh Gradient?
A mesh gradient is a type of gradient where color transitions radiate from multiple independent control points distributed across a two-dimensional canvas — rather than flowing in a single direction like a linear gradient, or expanding from a single center like a radial gradient. Each control point has its own color, and the colors blend organically between all neighboring points simultaneously. The result is a complex, multi-directional color field that feels alive, dimensional, and impossible to achieve with standard CSS linear-gradient() or radial-gradient() syntax alone.
The visual effect resembles what happens when you drop several drops of ink into water: each drop spreads and merges with the others, creating smooth transitions that have no hard edge, no single axis, no obvious center. This is what makes mesh gradients so compelling for modern UI design — they feel natural and organic rather than geometric and mechanical.
Mesh gradients became mainstream in design software (Figma, Adobe Illustrator, Sketch) around 2020, then exploded in popularity with Apple's iOS 16 wallpapers and the broader "blurry gradient" trend across product landing pages, app splash screens, and brand identity materials. CSS cannot natively reproduce a true mesh gradient, but layered radial gradients — each with a transparent falloff — can approximate the effect closely enough for most production use cases.
How to Use the Mesh Gradient Generator
Start with a preset. The generator ships with 12 professionally curated presets: aurora (northern lights greens and purples), sunset (warm oranges and pinks), ocean (deep blues and cyans), forest (earth greens and browns), lavender (soft purples and whites), fire (reds, oranges, yellows), candy (bright pinks and blues), midnight (deep blues and near-blacks), desert (warm terracottas and golds), nordic (cool grays and ice blues), neon (electric greens and magentas), and pastel (soft multi-color mix). Clicking any preset immediately loads its color point configuration onto the canvas. This is the fastest way to find a starting direction.
Drag the color points. Each colored circle on the canvas is a control point. Click and drag any point to a new position. As you drag, the gradient reflows in real time, showing you how the composition changes. Moving a point toward the center of the canvas makes its color more dominant; pushing it toward a corner makes it an accent. Experiment freely — there is no wrong position.
Recolor individual points. Click on any color point (without dragging) to open its color picker. Select any color from the color wheel or enter a hex value directly. The canvas updates instantly. This is how you take a preset palette and adapt it to a specific brand — change one or two point colors to your brand primaries and the whole gradient shifts accordingly.
Add and remove points. Use the Add Point button to introduce a new control point at the center of the canvas, then drag it to your desired position and assign it a color. To remove a point, select it and use the Remove Point button. The sweet spot for complexity versus controllability is 4–8 points; below 4 feels too simple, above 8 becomes difficult to manage without unintended color collisions.
Export your gradient. Three export options are available: CSS (copies the radial-gradient CSS code to your clipboard), PNG (downloads a high-resolution raster image), and SVG (downloads a vector file using SVG filter primitives). Choose based on your intended use case — details below.
CSS Export: How Radial-Gradient Stacking Works
CSS does not have a native mesh gradient property. The exported CSS approximates the mesh effect by stacking multiple radial-gradient() layers, each positioned at the corresponding color point's canvas coordinates, using the background shorthand with comma-separated gradient layers.
Each layer uses the circle at X% Y% syntax to position the gradient origin, then transitions from the control point's color (with full opacity) to transparent. Because later layers in a CSS background stack render below earlier ones, and because each gradient uses screen-like blending through transparency, the colors mix visually in the browser — producing the mesh effect. A solid base color (the last layer, a plain color stop) fills any area not covered by the radial gradients.
The resulting CSS is copy-paste ready. Paste it into any background property in your stylesheet. It works in all modern browsers without any prefix. The CSS file size is typically 200–800 bytes — negligible for any web project.
One caveat: the CSS approximation looks best when viewed at the same canvas aspect ratio used during generation. If you stretch the element significantly in one dimension, the gradient proportions shift. For pixel-perfect reproduction, use the PNG or SVG export.
PNG vs SVG Export: When to Use Which
PNG export produces a raster image at the full canvas resolution. Use PNG when: you need the gradient as a background image in a native mobile app (iOS, Android), you're exporting for use in Figma, Sketch, or Photoshop as a layer, you need to embed the gradient in a PDF or Word document, or you want a background image file (background-image: url(gradient.png)) that renders identically across all browsers without any CSS computation. PNG is the most compatible and universally supported format. The downside is fixed resolution — if you scale the image up significantly, it will appear pixelated.
SVG export produces a vector file using SVG feBlend, feFlood, and feComposite filter primitives to replicate the mesh effect. SVG is resolution-independent, meaning it scales to any size without loss of quality. Use SVG when: you're embedding the gradient as a background in a web page and want infinite scalability, you're providing assets to a print designer who needs vector artwork, or you're using the gradient in a context where file size matters more than raster quality. Note that SVG mesh gradients rendered via filter primitives may look slightly different from the canvas preview in some browsers due to rendering engine differences.
Design Tips: Getting the Best Results
4–8 points is the sweet spot. Fewer than four points produces a gradient that can be achieved more simply with standard CSS. More than eight introduces complexity that's hard to control, and neighboring points with clashing colors create muddy zones in the middle. Start with a preset (which uses a proven point count) and add points only if you need a specific color in a specific region.
Use complementary or analogous colors. Complementary colors (opposite on the color wheel, like blue and orange) create energetic, high-contrast gradients suitable for CTAs, banners, and attention-grabbing backgrounds. Analogous colors (neighbors on the wheel, like blue, teal, and cyan) create harmonious, soothing gradients better suited for backgrounds that need to recede behind content. Triadic schemes (evenly spaced, like red, yellow, blue) work well for playful, brand-heavy designs like the "candy" preset.
Vary point positions intentionally. Avoid placing all points in a grid pattern — this creates a predictable tiled look. Instead, cluster some points close together (for a dominant color region) and spread others toward the edges (for subtle tinting). Asymmetry feels more natural and lively.
Test against your content. A gradient that looks beautiful in isolation may create poor contrast against text or UI elements placed on top. Before finalizing, overlay your text or card content on the gradient preview to check readability. If contrast is insufficient, shift the lighter or more vibrant points toward areas not covered by text.
Use Cases
Hero backgrounds: Full-width gradient backgrounds on landing page hero sections are the most common use case. A mesh gradient gives the hero visual depth without distracting from the headline and CTA.
Card and panel backgrounds: Apply the gradient as a background on a card component to make it stand out from surrounding white space. Works especially well for pricing cards, feature highlight cards, and testimonial sections.
App UI: Mobile and web app onboarding screens, splash screens, and tab bar backgrounds benefit enormously from mesh gradients. They communicate visual polish without requiring heavy image assets.
Desktop and mobile wallpapers: Export as high-resolution PNG and use as a device wallpaper. The organic color transitions look stunning on OLED screens.
Technical Notes: Screen Blend Mode and Browser Compatibility
The canvas rendering uses screen blend mode internally to mix the color point contributions. Screen blending (the inverse of multiply) always produces colors that are equal to or brighter than the input colors, which is why mesh gradients tend toward luminous, airy palettes rather than dark muddy ones. If you want a darker, moodier gradient, start with deeper base colors — don't expect adding black points to darken the overall result significantly due to screen blending behavior.
The CSS export uses standard properties supported in Chrome 10+, Firefox 3.6+, Safari 5.1+, and all modern Edge versions. No polyfill is needed. The SVG export uses SVG 1.1 filter primitives, which have equivalent broad support. PNG export works in every browser that supports the Canvas API (all browsers released since 2012).
Frequently Asked Questions
What exactly is a mesh gradient? A gradient where color transitions radiate from multiple independent points, blending together organically — unlike linear or radial gradients which have a single axis or center.
Can I use the exported CSS directly in my project? Yes. The exported CSS is production-ready. Paste it into any element's background property.
How many color points should I use? 4–8 is recommended. More points give more color complexity but become harder to manage.
Is the SVG export perfectly accurate? It is a close approximation. SVG filter-based rendering may differ slightly from the canvas preview in some browsers. For pixel-perfect accuracy, use the PNG export.
Does this work offline? Yes. The generator is entirely browser-based and works without an internet connection after the page loads.
For simpler gradient needs, see Gradient Generator. To pick colors for your points, use Color Picker. For box shadow design with matching colors, try Box Shadow Generator. For glassmorphism UI elements that layer well over mesh gradients, see CSS Glassmorphism Generator.