Glassmorphism Generator

Pick a glass look, then set the tint, blur and edge. The preview puts the pane over colourful shapes, because frosted glass only shows when something busy sits behind it.

How it works

A glass panel is three things: a see-through tint, a backdrop-filter that blurs whatever is behind the panel, and often a thin light border that catches the edge. The CSS here writes all three.

The effect depends entirely on the background. Over shapes, photos or gradients, the blur softens them and the panel looks frosted. Over one flat colour there is nothing to blur, and the panel is just a translucent box. Switch the preview to One flat colour to see that for yourself.

Text on glass sits over a background that changes from spot to spot. The contrast line checks your text colour against the tinted pane over each background colour in turn and reports the weakest one, which is the spot a reader will struggle with.

Safari supported backdrop-filter only with a -webkit- prefix for years, so the CSS includes both lines. A browser that has neither gets a thicker tint from the @supports block, so the text stays readable without the blur.

How to use it

  1. 1 Pick a look from the presets: Frosted, Clear, Milky, Smoked or Tinted.
  2. 2 Set the background colours in the preview to match your page.
  3. 3 Adjust the tint, blur, colour boost, edge and corners, and watch the contrast line.
  4. 4 Press Copy CSS and paste it into your stylesheet. Put the panel over a busy background.

Good to know

  • If the contrast line fails, raise the tint strength before you touch the text colour. A thicker tint evens out the background under every letter.
  • Colour boost is the saturate() filter. It makes the blurred colours richer, which is most of what makes glass look like glass rather than fog.
  • A light 1px edge helps the panel read as a separate object when its tint is close to the background.
  • Blurring is redone whenever the content behind the panel moves. A few small panels are fine; a full-screen blurred layer over a scrolling page can cost smoothness on slow phones.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Checking text on glass, worked through with real colours

Take the Frosted preset: a white tint at 25%, a 16px blur and dark navy text, #0f172a. Behind it sit three colours: an orange background, #ff7a45, and two shapes, purple #9b5de5 and cyan #00bbf9. A reader sees the text over whichever of those happens to be under each letter, so the question is not "what is the contrast" but "what is the worst contrast anywhere".

Start with the purple. Without the pane, navy text on #9b5de5 measures 4.32:1, just under the 4.5:1 that WCAG asks for normal text. The pane lays 25% white over the purple, which lightens it. Navy text on that lighter purple measures 6.42:1, a comfortable pass. Over the cyan the same pane gives 9.56:1. The purple is the weakest spot, so the tool reports 6.42:1 and names it. The tint is doing real work here: it lifts every background colour towards white, which is exactly what dark text needs.

Now swap the text to white and keep everything else. White on the frosted cyan measures 1.86:1, which most people cannot read comfortably. The same pane that helped dark text hurts light text, because it pushes the background towards the text colour. For white text, the Smoked preset does the opposite: a navy tint at 45% darkens everything behind it, and white text over the cyan then measures above 5:1.

Why check the plain colours and not the blurred ones? Blur replaces each spot with an average of its neighbours, and an average of two colours mostly lands between them in lightness. Mostly, not always: screen colours are stored on a curve, so the average of pure red and pure green comes out slightly darker than the red. Where a blur meets two strong colours, the real contrast can dip a little below the figure shown, so treat a result just over 4.5:1 as borderline. Colour boost, the saturate() filter, is also left out; it changes how vivid the colours are more than how light they are.

The limits. The check knows only the colours you enter; over a photo, enter the lightest and darkest colours you see in it. It measures colour, not texture, and a busy image under thin text can be hard to read even at a passing ratio. And the effect needs something to blur: on a plain page, glassmorphism has nothing to show, and a solid card would serve the reader better.

Frequently asked questions

Why does my glass panel look like a plain grey box?

Because the background behind it is flat. backdrop-filter blurs what is behind the element, and a blurred flat colour is the same flat colour. Put the panel over an image, a gradient or shapes.

Which browsers support backdrop-filter?

Current versions of Chrome, Edge, Firefox and Safari all support it. Older Safari versions need the -webkit- prefix, which the CSS includes. Browsers without it get the fallback tint.

How is the text contrast measured?

The tool lays the tint over each background colour, measures your text colour against each result with the WCAG formula, and shows the lowest ratio. Blur mixes neighbouring colours, and the mix can come out a little darker than either, so leave some margin above the threshold.

Is anything uploaded?

No. The CSS is written by code running in this page, and your browser draws the preview.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.