Mesh Gradient Aurora
A soft aurora background built from several blurred radial gradients, with palette, blur and slow drift controls.
AI prompt
Abstract soft aurora gradient background in deep navy, with large blurred glows of teal, violet and a touch of pink flowing diagonally across the frame like northern lights, smooth blending without hard edges, a very fine film grain overlay, subtle darker vignette at the corners, empty space in the centre for a headline, calm and premium. Variants: warm sunrise oranges and magentas, and mint and sky-blue on a light background. Negative: banding, hard shapes, clutter, text, logos. Reduced motion: static image.About this pattern
Definition
A mesh or aurora gradient layers several large, soft colour spots so they blend smoothly, like northern lights. It gives a hero section a rich, ambient background without an image file. Each spot is a radial gradient or a blurred circle, and slow movement makes it feel alive.
When to use it
- Use three to five spots in related hues; more look muddy.
- Blur heavily so edges disappear; a little grain on top hides banding.
- Keep text on a plain card or pick a dark overlay for contrast.
- Slow drift, about 20 seconds per loop, is enough.
What the controls do
- Three palettes, a Blur slider and a Drift switch.
Motion & timing
- Spots drift slowly in a loop.
- Reduced motion: drift is off and the switch is disabled.
Tips & variations
- Heavy blur on large areas costs performance; use fewer, larger blobs.
- Provide a static fallback colour behind the gradients.
Code of this live preview
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Palette"><button data-p="0" aria-pressed="true">Aurora</button><button data-p="1" aria-pressed="false">Sunrise</button><button data-p="2" aria-pressed="false">Mint</button></div><div class="sc" id="sc"><div class="ly" id="ly"><i></i><i></i><i></i><i></i></div><b>Aurora</b></div><div class="two"><label class="rw">Blur <b id="bv">30px</b><input id="bl" type="range" min="8" max="60" value="30"></label><label class="sw"><input id="dr" type="checkbox"> Drift</label></div></div>:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sc{height:124px;border-radius:12px;position:relative;overflow:hidden;background:var(--bg);display:grid;place-items:center;isolation:isolate}.sc b{position:relative;z-index:2;font:700 22px system-ui,sans-serif;color:#fff;letter-spacing:.01em;text-shadow:0 1px 8px rgba(0,0,0,.25)}.ly{position:absolute;inset:-30px;filter:blur(var(--bl))}.ly i{position:absolute;border-radius:50%;opacity:.9}.ly i:nth-child(1){left:6%;top:20%;width:130px;height:110px;background:var(--c1)}.ly i:nth-child(2){left:40%;top:-4%;width:150px;height:120px;background:var(--c2)}.ly i:nth-child(3){left:62%;top:44%;width:140px;height:110px;background:var(--c3)}.ly i:nth-child(4){left:24%;top:56%;width:110px;height:90px;background:var(--c4)}.ly.mv{animation:dr 14s ease-in-out infinite alternate}@keyframes dr{from{transform:translate(-14px,6px) rotate(-3deg)}to{transform:translate(14px,-8px) rotate(3deg)}}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sw{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted)}@media (prefers-reduced-motion:reduce){.ly.mv{animation:none}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const PL=[['#0b1030','#2de2c9','#7a4dff','#ff63c3','#2b8cff','Aurora'],['#2a0f2e','#ff8a3d','#ff3d7f','#ffd166','#c13cff','Sunrise'],['#eaf7f3','#7de0c0','#8ec9ff','#fff0a8','#b6f0d8','Mint']],sc=document.getElementById('sc'),ly=document.getElementById('ly'),bl=document.getElementById('bl'),dr=document.getElementById('dr'),bs=[...document.querySelectorAll('#pre button')],calm=matchMedia('(prefers-reduced-motion:reduce)').matches;let p=0;if(calm)dr.disabled=true;
function up(){const c=PL[p];['--bg','--c1','--c2','--c3','--c4'].forEach((k,i)=>sc.style.setProperty(k,c[i]));sc.querySelector('b').textContent=c[5];sc.querySelector('b').style.color=p===2?'#17303a':'#fff';sc.querySelector('b').style.textShadow=p===2?'none':'';ly.style.setProperty('--bl',bl.value+'px');ly.style.filter='blur('+bl.value+'px)';ly.classList.toggle('mv',dr.checked&&!calm);document.getElementById('bv').textContent=bl.value+'px';bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));bl.addEventListener('input',up);dr.addEventListener('change',up);up();One complete HTML file. Save it and open it in a browser.
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Mesh Gradient Aurora — demo</title>
<style>
:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
html,body{height:100%}body{background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Roboto,sans-serif;-webkit-font-smoothing:antialiased}.stage{min-height:100%;display:grid;place-items:center;padding:24px}button,input,select,textarea{font-family:inherit}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sc{height:124px;border-radius:12px;position:relative;overflow:hidden;background:var(--bg);display:grid;place-items:center;isolation:isolate}.sc b{position:relative;z-index:2;font:700 22px system-ui,sans-serif;color:#fff;letter-spacing:.01em;text-shadow:0 1px 8px rgba(0,0,0,.25)}.ly{position:absolute;inset:-30px;filter:blur(var(--bl))}.ly i{position:absolute;border-radius:50%;opacity:.9}.ly i:nth-child(1){left:6%;top:20%;width:130px;height:110px;background:var(--c1)}.ly i:nth-child(2){left:40%;top:-4%;width:150px;height:120px;background:var(--c2)}.ly i:nth-child(3){left:62%;top:44%;width:140px;height:110px;background:var(--c3)}.ly i:nth-child(4){left:24%;top:56%;width:110px;height:90px;background:var(--c4)}.ly.mv{animation:dr 14s ease-in-out infinite alternate}@keyframes dr{from{transform:translate(-14px,6px) rotate(-3deg)}to{transform:translate(14px,-8px) rotate(3deg)}}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sw{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted)}@media (prefers-reduced-motion:reduce){.ly.mv{animation:none}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Palette"><button data-p="0" aria-pressed="true">Aurora</button><button data-p="1" aria-pressed="false">Sunrise</button><button data-p="2" aria-pressed="false">Mint</button></div><div class="sc" id="sc"><div class="ly" id="ly"><i></i><i></i><i></i><i></i></div><b>Aurora</b></div><div class="two"><label class="rw">Blur <b id="bv">30px</b><input id="bl" type="range" min="8" max="60" value="30"></label><label class="sw"><input id="dr" type="checkbox"> Drift</label></div></div>
</div>
<script>
const PL=[['#0b1030','#2de2c9','#7a4dff','#ff63c3','#2b8cff','Aurora'],['#2a0f2e','#ff8a3d','#ff3d7f','#ffd166','#c13cff','Sunrise'],['#eaf7f3','#7de0c0','#8ec9ff','#fff0a8','#b6f0d8','Mint']],sc=document.getElementById('sc'),ly=document.getElementById('ly'),bl=document.getElementById('bl'),dr=document.getElementById('dr'),bs=[...document.querySelectorAll('#pre button')],calm=matchMedia('(prefers-reduced-motion:reduce)').matches;let p=0;if(calm)dr.disabled=true;
function up(){const c=PL[p];['--bg','--c1','--c2','--c3','--c4'].forEach((k,i)=>sc.style.setProperty(k,c[i]));sc.querySelector('b').textContent=c[5];sc.querySelector('b').style.color=p===2?'#17303a':'#fff';sc.querySelector('b').style.textShadow=p===2?'none':'';ly.style.setProperty('--bl',bl.value+'px');ly.style.filter='blur('+bl.value+'px)';ly.classList.toggle('mv',dr.checked&&!calm);document.getElementById('bv').textContent=bl.value+'px';bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));bl.addEventListener('input',up);dr.addEventListener('change',up);up();
</script>
</body></html>