Color

Glassmorphism Generator

Create frosted-glass cards with live preview and copy-ready CSS.

  • Free forever
  • No sign-up
  • Runs in your browser
Share X LinkedIn
Frosted glassLive preview

Background color 1

#6366f1

Background color 2

#ec4899
12px
18%
35%
18px

Glass tint

#ffffff

backdrop-filter is supported in all current browsers; the -webkit- prefix is included for older Safari. Always provide a readable fallback background for browsers that ignore it.

CSS
background: rgba(255, 255, 255, 0.18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 18px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);

What is glassmorphism?

Glassmorphism is the frosted-glass look that has defined a lot of interface design from the early 2020s into the 2025–26 translucent-UI wave: panels, cards and navigation bars that you can partly see through, with whatever is behind them softened into a blur. It feels modern, layered and physical — like sheets of real glass stacked over a colourful scene.

The effect is not a single property. It is a small recipe, and getting the balance right by hand means juggling several values at once. This generator builds the whole recipe for you, shows it live on a card floating over a gradient you control, and outputs CSS you can paste straight into a stylesheet.

The tool above lets you tune the blur, the transparency of the glass, a colour tint, the border visibility, and the corner radius, all over an adjustable two-colour background so the frosted effect is actually visible. When it looks right, one click copies the full block, including the -webkit- prefix for older Safari.

How to use it

  1. Set the background. Glass needs something behind it. Pick the two background colours to build a gradient that stands in for the busy scene your card will eventually sit on — or design that scene properly with the CSS Gradient Generator. Drag the colours apart for a vivid backdrop or close together for a subtle one.
  2. Adjust the blur. This is the heart of the effect. Low values give a light haze; higher values turn the background into soft colour fields. Most real glass UI sits around 8–16px.
  3. Tune the transparency. This controls how much of the tint colour shows. Too opaque and it stops looking like glass; too transparent and text on top becomes hard to read.
  4. Pick a tint. White tints read as bright frosted glass; dark tints suit dark-mode panels. A faint coloured tint can match your brand.
  5. Set border visibility. A thin, semi-transparent light border catches the "edge" of the glass and is what sells the illusion. Lower it toward zero for a borderless look.
  6. Choose a corner radius to match your design language.
  7. Copy the CSS and paste it onto your card or panel.

Everything runs on your own device, so the preview updates instantly and keeps working offline once the page has loaded.

The CSS it produces

The generator outputs a small, complete block:

background: rgba(255, 255, 255, 0.18);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.35);
border-radius: 18px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);

Three ingredients do the work together:

  • backdrop-filter: blur(...) blurs whatever is rendered behind the element. The duplicate -webkit-backdrop-filter line covers older Safari versions that only understood the prefixed form.
  • A translucent background (the rgba(...) value) tints the glass while still letting the blurred scene show through. Without transparency here, the blur is hidden and you just get a solid box.
  • A thin, light border plus a soft box-shadow define the physical edge of the pane and lift it off the surface, completing the illusion of a real sheet of glass. If you want a different depth, tune that shadow on its own with the CSS Box-Shadow Generator.

When glassmorphism works — and when it does not

Glass only looks like glass when there is something interesting behind it. The single most common reason a frosted card falls flat is that it has been placed over a plain, solid colour, leaving backdrop-filter nothing to blur. It belongs over:

  • Vivid gradients and mesh backgrounds.
  • Photographs or hero imagery.
  • Overlapping coloured shapes or blurred "blobs".
  • Other content the user scrolls past underneath a sticky panel.

It works less well over flat, single-colour pages, dense body text (where the blur fights readability), and tiny UI elements where the effect is too small to register. Used sparingly — one or two focal panels per screen — it feels premium; used on everything, it turns into visual noise.

Accessibility and legibility caveats

Translucency is beautiful and also risky for readability, so design defensively:

  • Check contrast over the whole background range. Text on glass can be perfectly readable over a dark area of the backdrop and unreadable a few pixels over where the background is light. Test against the brightest and darkest parts of the scene behind it.
  • Lean on a tint and shadow for text. A slightly more opaque glass background, or a subtle text shadow, restores contrast without killing the effect.
  • Respect reduced-transparency preferences. Some users enable a system "reduce transparency" setting. Provide a sensible fallback — a more solid background — so the interface stays usable when blur and translucency are dialled down.
  • Never encode meaning in transparency alone. State, focus and boundaries should also be conveyed with colour, borders or labels, not just the glass effect.

Browser support

backdrop-filter is now supported across all current major browsers — Chrome, Edge, Firefox, Safari and their mobile counterparts. The main caveat is history: older Safari releases required the -webkit-backdrop-filter prefix, which is why the generator always outputs both lines. For very old browsers that ignore the property entirely, the translucent background you set still applies as a graceful fallback — the panel simply shows as a flat translucent colour without the blur, which keeps content legible rather than broken.

A small practical note: backdrop-filter can be GPU-intensive, especially with large blur radii on many panels or while scrolling. Keep blur values as low as the look allows and reserve the effect for a few focal elements rather than every card on the page.

Riding the translucent-UI trend, without the clutter

Frosted glass is having a long moment, and it is easy to copy a snippet that looks great in a demo and falls apart in a real layout. This generator lets you tune the effect against a background you control, judge legibility before you ship, and copy CSS that already includes the prefix and a sensible shadow.

Because it runs entirely in your browser, there are no accounts, no limits and nothing leaves your device. Keep it open while you design — adjust, preview, copy, paste — and turn the frosted-glass idea in your head into clean, production-ready CSS in seconds, with the controls front and centre and no ads in the way.

Frequently asked questions

Comet's got your back

Stuck on something? Every tool has a short guide and FAQ — and Comet can point you to the right spot.

Visit help centre

Related tools

All Color tools →