Frosted Glass & Acrylic
Drag a glass panel over a colourful backdrop and tune blur, tint and grain to see the material change.
AI prompt
Translucent frosted glass panel floating in front of soft out-of-focus colour fields in muted indigo, coral and mint, backdrop heavily blurred, fine micro-grain on the glass, thin bright edge highlight along the border, soft inner glow, subtle drop shadow beneath, light scattering visible at the edges, premium product-render quality, studio lighting from the upper left, shallow depth of field. Material notes: frosted glass is clear with blur; acrylic is denser with a tint; add "milky" for more opacity, "etched" for a sandblasted pattern. Negative: mirror reflections, plastic look, hard shadows, cracks, dirty glass, text on the panel that is unreadable.About this pattern
Definition
Frosted glass scatters light so what lies behind is blurred but still visible. Acrylic is similar but denser, with a tint, soft edges and sometimes fine grain.
When to use it
- Adds depth and hierarchy: the panel clearly sits in front while keeping context behind it.
- Use for overlays, control panels, product renders and abstract backgrounds in AI images.
- Keep contrast high for text; more blur and more tint make text easier to read.
What the controls do
- Sliders for blur, tint and grain; drag the panel to see different parts of the background through it.
Motion & timing
- The background blobs drift slowly for 12 seconds per loop to show how the blur behaves on moving content.
- Reduced motion: the blobs stay still.
Tips & variations
- Blur is expensive on large areas, so keep panels modest in size on mobile.
- Provide a solid fallback colour where blur is not supported.
Code of this live preview
<div class="st" id="st"><i class="b b1"></i><i class="b b2"></i><i class="b b3"></i><div class="gl" id="gl" tabindex="0" aria-label="Glass panel. Drag, or use arrow keys to move."><b>Frosted</b><small>Drag me</small></div></div>
<div class="ctl"><label>Blur <input id="bl" type="range" min="0" max="30" value="14"></label><label>Tint <input id="tn" type="range" min="0" max="80" value="30"></label><label>Grain <input id="gr" type="range" min="0" max="40" value="12"></label></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}
.st{position:relative;width:min(300px,100%);height:160px;border-radius:12px;overflow:hidden;background:#f3efe9;touch-action:none}
.b{position:absolute;border-radius:50%;animation:dr 12s ease-in-out infinite alternate}
.b1{width:110px;height:110px;left:20px;top:10px;background:#8f9cf5}
.b2{width:90px;height:90px;right:30px;top:50px;background:#f58f8f;animation-delay:-4s}
.b3{width:80px;height:80px;left:110px;bottom:-20px;background:#8fe0c0;animation-delay:-8s}
@keyframes dr{to{transform:translate(26px,-18px)}}
.gl{position:absolute;left:78px;top:34px;width:140px;height:90px;border-radius:16px;display:grid;place-content:center;text-align:center;cursor:grab;backdrop-filter:blur(var(--bl,14px)) saturate(1.3);-webkit-backdrop-filter:blur(var(--bl,14px)) saturate(1.3);background:rgba(255,255,255,var(--tn,.3));border:1px solid rgba(255,255,255,.7);box-shadow:0 10px 30px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.8);background-image:var(--grain,none)}
.gl b{font-size:16px;font-weight:600}
.gl small{font-size:11px;color:#3d3d3d}
.gl:focus-visible{outline:2px solid #171717;outline-offset:3px}
.ctl{width:min(300px,100%);margin-top:10px;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
label{font-size:11.5px;color:var(--muted);display:grid;gap:3px}
input[type=range]{width:100%;accent-color:#171717}
input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.b{animation:none}}const gl=document.getElementById('gl'),st=document.getElementById('st'),bl=document.getElementById('bl'),tn=document.getElementById('tn'),gr=document.getElementById('gr');
const cv=document.createElement('canvas');cv.width=cv.height=96;const cx=cv.getContext('2d');
const noise=a=>{const im=cx.createImageData(96,96);for(let i=0;i<im.data.length;i+=4){const v=Math.random()<.5?0:255;im.data[i]=im.data[i+1]=im.data[i+2]=v;im.data[i+3]=Math.random()*255*a;}cx.putImageData(im,0,0);return 'url('+cv.toDataURL()+')';};
function apply(){gl.style.setProperty('--bl',bl.value+'px');gl.style.setProperty('--tn',(tn.value/100).toFixed(2));gl.style.setProperty('--grain',+gr.value?noise(gr.value/100*.9):'none');}
[bl,tn,gr].forEach(i=>i.addEventListener('input',apply));apply();
let dx=0,dy=0,drag=false;
gl.addEventListener('pointerdown',e=>{drag=true;dx=e.clientX-gl.offsetLeft;dy=e.clientY-gl.offsetTop;gl.setPointerCapture(e.pointerId);});
gl.addEventListener('pointermove',e=>{if(!drag)return;gl.style.left=Math.max(0,Math.min(st.clientWidth-gl.offsetWidth,e.clientX-dx))+'px';gl.style.top=Math.max(0,Math.min(st.clientHeight-gl.offsetHeight,e.clientY-dy))+'px';});
gl.addEventListener('pointerup',()=>drag=false);gl.addEventListener('pointercancel',()=>drag=false);
gl.addEventListener('keydown',e=>{const m={ArrowLeft:[-12,0],ArrowRight:[12,0],ArrowUp:[0,-12],ArrowDown:[0,12]}[e.key];if(!m)return;e.preventDefault();gl.style.left=Math.max(0,Math.min(st.clientWidth-gl.offsetWidth,gl.offsetLeft+m[0]))+'px';gl.style.top=Math.max(0,Math.min(st.clientHeight-gl.offsetHeight,gl.offsetTop+m[1]))+'px';});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>Frosted Glass & Acrylic — 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}}
.st{position:relative;width:min(300px,100%);height:160px;border-radius:12px;overflow:hidden;background:#f3efe9;touch-action:none}
.b{position:absolute;border-radius:50%;animation:dr 12s ease-in-out infinite alternate}
.b1{width:110px;height:110px;left:20px;top:10px;background:#8f9cf5}
.b2{width:90px;height:90px;right:30px;top:50px;background:#f58f8f;animation-delay:-4s}
.b3{width:80px;height:80px;left:110px;bottom:-20px;background:#8fe0c0;animation-delay:-8s}
@keyframes dr{to{transform:translate(26px,-18px)}}
.gl{position:absolute;left:78px;top:34px;width:140px;height:90px;border-radius:16px;display:grid;place-content:center;text-align:center;cursor:grab;backdrop-filter:blur(var(--bl,14px)) saturate(1.3);-webkit-backdrop-filter:blur(var(--bl,14px)) saturate(1.3);background:rgba(255,255,255,var(--tn,.3));border:1px solid rgba(255,255,255,.7);box-shadow:0 10px 30px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.8);background-image:var(--grain,none)}
.gl b{font-size:16px;font-weight:600}
.gl small{font-size:11px;color:#3d3d3d}
.gl:focus-visible{outline:2px solid #171717;outline-offset:3px}
.ctl{width:min(300px,100%);margin-top:10px;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
label{font-size:11.5px;color:var(--muted);display:grid;gap:3px}
input[type=range]{width:100%;accent-color:#171717}
input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.b{animation:none}}
</style></head>
<body><div class="stage">
<div class="st" id="st"><i class="b b1"></i><i class="b b2"></i><i class="b b3"></i><div class="gl" id="gl" tabindex="0" aria-label="Glass panel. Drag, or use arrow keys to move."><b>Frosted</b><small>Drag me</small></div></div>
<div class="ctl"><label>Blur <input id="bl" type="range" min="0" max="30" value="14"></label><label>Tint <input id="tn" type="range" min="0" max="80" value="30"></label><label>Grain <input id="gr" type="range" min="0" max="40" value="12"></label></div>
</div>
<script>
const gl=document.getElementById('gl'),st=document.getElementById('st'),bl=document.getElementById('bl'),tn=document.getElementById('tn'),gr=document.getElementById('gr');
const cv=document.createElement('canvas');cv.width=cv.height=96;const cx=cv.getContext('2d');
const noise=a=>{const im=cx.createImageData(96,96);for(let i=0;i<im.data.length;i+=4){const v=Math.random()<.5?0:255;im.data[i]=im.data[i+1]=im.data[i+2]=v;im.data[i+3]=Math.random()*255*a;}cx.putImageData(im,0,0);return 'url('+cv.toDataURL()+')';};
function apply(){gl.style.setProperty('--bl',bl.value+'px');gl.style.setProperty('--tn',(tn.value/100).toFixed(2));gl.style.setProperty('--grain',+gr.value?noise(gr.value/100*.9):'none');}
[bl,tn,gr].forEach(i=>i.addEventListener('input',apply));apply();
let dx=0,dy=0,drag=false;
gl.addEventListener('pointerdown',e=>{drag=true;dx=e.clientX-gl.offsetLeft;dy=e.clientY-gl.offsetTop;gl.setPointerCapture(e.pointerId);});
gl.addEventListener('pointermove',e=>{if(!drag)return;gl.style.left=Math.max(0,Math.min(st.clientWidth-gl.offsetWidth,e.clientX-dx))+'px';gl.style.top=Math.max(0,Math.min(st.clientHeight-gl.offsetHeight,e.clientY-dy))+'px';});
gl.addEventListener('pointerup',()=>drag=false);gl.addEventListener('pointercancel',()=>drag=false);
gl.addEventListener('keydown',e=>{const m={ArrowLeft:[-12,0],ArrowRight:[12,0],ArrowUp:[0,-12],ArrowDown:[0,12]}[e.key];if(!m)return;e.preventDefault();gl.style.left=Math.max(0,Math.min(st.clientWidth-gl.offsetWidth,gl.offsetLeft+m[0]))+'px';gl.style.top=Math.max(0,Math.min(st.clientHeight-gl.offsetHeight,gl.offsetTop+m[1]))+'px';});
</script>
</body></html>