Mesh gradients are one of the most widely used visual styles in modern UI design — found in Apple's macOS wallpapers, Stripe's marketing pages, iOS app icons, and countless SaaS landing pages. But despite their ubiquity, many designers don't know exactly what a mesh gradient is or how it works. This guide explains everything.
A mesh gradient is a type of gradient where multiple color control points are placed at arbitrary positions across a canvas. Each point radiates its color outward, blending with neighboring points based on distance. The result is a smooth, multi-directional color field that transitions naturally in every direction simultaneously — unlike standard CSS gradients, which blend colors along a single axis.
The key visual characteristic is that it has no single vanishing point or axis. Colors pool and blend organically, creating the impression of light scattered across a surface — similar to the way light looks inside a soap bubble or on the inside of an abalone shell.
Mesh gradients originated in professional vector graphics. Adobe Illustrator introduced gradient meshes in version 8.0 (1998) as part of its advanced gradient toolset. The modern flat mesh gradient style — without visible grid lines, using 4–16 soft color points on a simple canvas — became popularized around 2019–2021, driven by Figma's design community and Apple's macOS Monterey wallpapers.
The most common algorithm for browser-based mesh gradients is distance-weighted interpolation (inverse-distance weighting). For each pixel on the canvas:
More sophisticated implementations use radial basis function (RBF) interpolation, which produces smoother transitions with better mathematical properties.
| Feature | CSS Gradient | Mesh Gradient |
|---|---|---|
| Direction | Single axis | Multi-directional |
| Color points | Along one axis | Anywhere on canvas |
| CSS support | Native — all browsers | No native CSS function |
| Export | Not needed | Recommended (PNG) |
No — there is no mesh-gradient() CSS function. The closest approximation is stacking multiple radial gradients:
background-image: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.8), transparent 50%), radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.8), transparent 50%), radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.8), transparent 50%), linear-gradient(135deg, #0f0f1a, #1a1a2e);
This approximation works well for 3–5 color points but diverges from true mesh blending with more points. For pixel-accurate mesh gradients, export as PNG and use it as a background image.
Figma does not have a native mesh gradient fill type, but you can approximate one:
Alternatively, use the Mesh Gradient Generator and export as PNG, then import into Figma as an image fill.