What is a mesh gradient?
also known ascolor mesh · gradient mesh · blob gradient
A mesh gradient blends several colored points across a surface, producing soft, organic washes of color that a straight two-color gradient cannot.
background: radial-gradient(at 20% 20%, ...), radial-gradient(at 80% 30%, ...)filter: blur(60px)A normal gradient is a journey from A to B. A mesh gradient is a weather map. Colors sit at several points on a surface, each one bleeding outward until it meets its neighbours, and the result looks less like a design element and more like light falling across a wall.
Technically, the idea comes from illustration software, where tools like the gradient mesh in Adobe Illustrator let you place colored control points on a grid and drag them around. Each point owns a color, and the software interpolates smoothly between them. That is how you get a coral glow melting into lavender, which melts into pale blue, without any visible stripe or axis.
CSS has no true mesh gradient primitive, so on the web the effect is usually built in one of three ways. You can stack several radial gradients, each positioned at a different spot with a different color, and let them overlap. You can export a static image or SVG from a design tool and use it as a background. Or you can render it on a canvas or with a shader if you need it to move. The first two are cheap and reliable. The third looks lovely and costs battery.
Mesh gradients earned their reputation as the standard backdrop for glassmorphism. Frosted glass needs something colorful to blur, and a mesh supplies exactly that: lots of hue variation in soft shapes, with no hard edges to fight the panel. They also work on their own, as hero backgrounds, app icons, social cards and empty states, wherever flat color feels sterile.
The common failure is muddiness. Mix two strongly contrasting colors, say orange and teal, and the middle turns brown. Use too many control points and the surface becomes a smeared palette. Use fully saturated neon colors and the page feels like a 2021 landing page template. The second failure is putting text straight on top. Because brightness varies across the surface, a heading can be perfectly legible on the left and unreadable on the right.
Here is what tends to work:
- Choose three to five colors from the same temperature family, all warm or all cool.
- Vary lightness as well as hue, so the mesh has depth and not just patches of the same brightness.
- Keep saturation moderate. Muted, slightly dusty colors look more current than pure ones.
- Put solid or lightly tinted panels between the mesh and your text.
- Bake the gradient to an optimised image when it does not need to animate.
If you want motion, move it slowly and let it be optional. A mesh that drifts over thirty seconds feels alive. One that swirls in five feels like a screensaver, and it burns GPU time. Respect the reduced motion preference by freezing it.
For AI prompts, describe the colors and where they live. Ask for four soft radial gradients layered on an off-white base, naming each color and its position, such as peach at the top left, lilac at the right, pale sky at the bottom. Add that it should stay low in contrast so text is readable. If you only write beautiful mesh gradient, you will get a garish rainbow.
- Backdrops behind glass UI
- Hero sections needing soft organic color
- Brand backgrounds where flat color would feel sterile
- Anywhere text sits directly on top, contrast becomes unreliable
- +Keep colors in the same temperature family (all cool, all warm)
- +Limit to 3–5 control points, more becomes muddy
- −Don't combine high-contrast complementary colors, you'll get muddy mid-tones
AI tools already know the word. Here is how to avoid the stock version.
The stock versionPink, purple and blue blobs melting into each other at full saturation behind a centered white headline.
- +Take the colors from the product's own world, such as a photo or the logo, instead of the purple to blue default.
- +Use three or four stops in one hue family plus one contrasting stop, and keep the lightest area under the text.
- +Confine it to one area, such as the hero, and fade it into a solid surface.
- +Add a little grain at 4% to 8% opacity so the gradient does not band.
Mesh Gradient: your questions, answered
What is a mesh gradient?
A mesh gradient is a color effect made by blending several colored points across a surface, so each color spreads outward and merges with its neighbours. The result is soft, organic and painterly, unlike a linear gradient that only moves from one color to another along a single line.
How do you make a mesh gradient in CSS?
CSS has no native mesh gradient, so you layer several radial-gradient backgrounds at different positions and colors over a base color. Alternatively, create the mesh in a design tool and export it as an optimised image or SVG. Use the image route when the background does not need to move.
What is the difference between a mesh gradient and a linear gradient?
A linear gradient moves between colors along one straight axis. A mesh gradient places many colored points across a two-dimensional surface and blends them in every direction. That gives irregular, cloud-like color fields that a linear gradient cannot imitate.
Are mesh gradients still in style?
Yes, with restraint. The saturated peach, pink and purple meshes of the early 2020s now feel dated. Current work favours muted, tonal palettes, lower contrast and subtle grain, using the mesh as atmosphere rather than as the main event.
Do mesh gradients hurt performance?
Static ones barely do, especially when exported as an optimised image. Live animated meshes on canvas or with shaders can drain battery and stutter on older devices. If you must animate, keep it slow, small and switchable under the reduced motion setting.
More quick answers
Why do mesh gradients go muddy?
Mixing colors that sit opposite each other on the color wheel produces gray or brown in the middle. Stay within one temperature family and vary lightness to avoid it.
Mesh gradient vs grainy gradient: what is the difference?
A mesh gradient is about how colors are arranged. A grainy gradient adds noise on top of any gradient. Many designers combine the two for a tactile finish.
What goes well with a mesh gradient?
Frosted glass panels are the classic partner, since they need colorful variation to blur. Clean, simple typography on solid surfaces also keeps the page readable.
Can I put text directly on a mesh gradient?
Only if you check contrast across the whole surface. Because brightness varies, safer options are a tinted panel behind the text or keeping the mesh low in contrast.
What is a conic aura and how does it differ?
A conic aura is a blurred circular halo placed behind one focal element. A mesh gradient fills a whole background with blended color points.
Found this useful? A GitHub star helps other designers find it.