Skip to content
ColorKit

Free glassmorphism CSS generator

Glassmorphism generator that survives a real backdrop

Free, no signup: move the blur, saturation and tint-opacity sliders and the frosted pane updates over whichever of the four scenes you put behind it, then copy the rule. What comes out is one class of six declarations plus an @supports block, because the property needs the -webkit- prefix on Safari 17 and below and a flat color where it is missing entirely. The panel beside the code scores your label against the two extremes any backdrop can reach — the tint over pure white and the tint over pure black — so the number you are shown is the worst reading, not the flattering one.

  • 100% free
  • No signup
  • 4 backdrops
  • @supports fallback
  • Worst-case contrast

Pane label

Body copy sitting on the pane, at the size a card subtitle usually ships in.

Press Ctrl+V anywhere on the page to drop in a tint from your brand palette — no need to click the field first.

CSS, with the prefix and the fallback

.glass-card {
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  backdrop-filter: blur(14px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18);
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .glass-card {
    background: #ca96a8;
  }
}

Legibility floor for the label

A backdrop moves, so the honest question is the worst case. These are the label scored against the tint composited over pure white and over pure black.

Pane label

Over the lightest possible backdrop: 17.85:1

Pane resolves to #ffffff

Pane label

Over the darkest possible backdrop: 1.31:1

Pane resolves to #2e2e2e

Floor 1.31:1 — below 3:1, so the label is unreadable over part of its own backdrop. Raising tint opacity above 38% is usually what fixes it.

Fallback color

#ca96a8 — the tint flattened over #be7f95, the mean of the warm photo scene. Swap that hex for the mean of your own backdrop before shipping.

How to build a glassmorphism panel

Three steps from a tint to a rule that still works on the browsers that never got the property.

  1. Put something worth blurring behind the pane

    Choose one of the four scenes under the preview — a warm photo, a dark interface, a busy mesh or lines of text. This is not decoration: backdrop-filter has nothing to work on over a flat color, and a pane that looks convincing over an orange-to-blue gradient can look like smeared plastic over body copy. Judge the effect over whatever your page actually puts behind it.

  2. Set the three numbers that make it read as glass

    Blur decides how far the frosting spreads, and 8px to 16px is the range where a card-sized pane still suggests a surface rather than a fog bank. Saturation puts back the chroma the blur averaged away — 150% to 180% is where most of the recognizable recipes sit. Tint opacity is the trade: every point you add makes the label easier to read and the glass less glassy, and the edge highlight slider adds the hairline stroke along the border that sells the material.

  3. Copy the rule, then fix the fallback color

    The output is one class plus an @supports block, and the prefixed declaration comes with it. The fallback hex is your tint flattened over the mean color of the preview scene, so swap it for the mean of your own backdrop before shipping — a fallback tuned to a dark hero looks wrong on a white page. The strip under the code reports whether the browser you are reading this in has backdrop-filter at all.

Technical specifications

Declarations emittedbackground, -webkit-backdrop-filter, backdrop-filter, border, border-radius and an optional box-shadow, followed by a two-line @supports block
Blur0-40px in 1px steps, default 14px; 8-16px is the usable band for a card-sized pane
Backdrop saturation100-220%, default 165% — the correction for the chroma a blur averages away
Backdrop brightness60-140%, and dropped from the filter chain entirely when left at the identity value of 100%
Tint and edgeTint opacity 0-100% (default 18%) over any parsed color; edge highlight is a 1px white stroke at 0-100% alpha, default 35%
Browser supportChrome 76, Edge 79, Firefox 103 unprefixed; Safari 9 with -webkit- and Safari 18 without. The page reports what the browser reading it supports
Fallback@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) carrying one opaque background, the tint flattened over the mean of the scene behind it
Contrast floorThe label scored against the tint over #ffffff and over #000000; the lower figure is reported against the 4.5:1 of WCAG 2.1 SC 1.4.3

Frequently asked questions

Why does my backdrop-filter blur nothing at all?

Almost always because an ancestor has started its own backdrop root. Any element up the tree carrying a filter, an opacity below 1, a transform, a mask or will-change begins a new group, and backdrop-filter can only sample what is painted inside the group it belongs to — so a pane inside a fading modal blurs that modal's empty backdrop and comes out flat. The two other causes are an opaque background on the pane itself, which simply covers the blurred result, and nothing being painted behind the pane in the first place.

Do I still need the -webkit- prefix?

Yes, if Safari 17 or older is in your support matrix. WebKit shipped the property as -webkit-backdrop-filter back in Safari 9 and only dropped the prefix in Safari 18, and iOS devices below 18 are still a measurable slice of mobile traffic. Chrome has been unprefixed since 76 and Firefox since 103, so for them the prefixed line is dead weight — harmless dead weight, since the unprefixed declaration follows it and wins wherever both are understood.

Why does my glass look grey next to the mockup?

Because blurring averages neighboring pixels, and averaging colors drags them toward grey. A 16px blur over a saturated photograph can visibly cut the chroma, which is why every recognizable frosted recipe pairs the blur with saturate() at 150% to 180% rather than using blur alone. The hairline stroke matters as much: a white border at roughly 35% opacity along the lit edge is what makes the pane read as a physical sheet instead of a translucent rectangle.

Is backdrop-filter expensive at scroll time?

It costs a repaint of everything underneath the element on every frame in which anything moves. A 320 by 200 pane is free in practice; a full-width sticky header with a blur is the version that drops frames on mid-range Android, because the compositor re-blurs the entire strip on each scroll tick. Animating the blur radius is the worst case of all — transition opacity or transform instead and leave the radius alone.

Why does the blur leak past my rounded corners on iOS?

That is a long-standing WebKit clipping bug: a rounded parent with overflow hidden does not reliably clip a child's backdrop-filter, so the filtered rectangle pokes out at the corners. Put the border-radius on the same element that carries the filter rather than on a wrapper around it; where the markup will not allow that, giving the clipping parent isolation: isolate or transform: translateZ(0) forces it onto its own compositing layer and the clip starts working.

Can I use this to blur the element's own background image?

No — backdrop-filter only touches pixels painted behind the element, never the element's own background. To blur the image itself, put it on a pseudo-element or a child and apply the ordinary filter property there, keeping the text in a sibling above it. Reaching for filter on the pane you want sharp is the usual version of this mistake, and it blurs the text along with everything else.

How do I promise readable text over a backdrop I do not control?

Score the label against the tint composited over pure white and over pure black, then design for the lower of the two numbers. A ratio measured against one screenshot tells you nothing about what happens when the visitor scrolls a photograph underneath, and this page reports both extremes for exactly that reason. When the floor falls short of 4.5:1, the repairs in ascending order of damage to the look are: raise the tint opacity, shift the tint away from the label's lightness, or drop a small solid scrim behind the text alone.

About frosted glass in CSS

Glassmorphism is one property doing nearly all the work. backdrop-filter takes the pixels already painted behind an element, runs a filter chain over them, and composites the element's own background on top of the result. That ordering is the effect and also its constraint: the pane's background must be translucent, or there is nothing to see the blurred backdrop through, and something has to be painted behind it, or there is nothing to blur. It is a different property from the filter chain you apply to an element itself, which is why so many first attempts end up with blurred text.

The failure most people hit is invisible in the CSS. Backdrop filtering happens within a backdrop root, and any ancestor with a transform, an opacity below 1, a mask, a filter or will-change creates a new one — so the pane samples an empty group and renders flat, and nothing in the rule looks wrong. The second is that the effect needs a backdrop with structure, which is why a multi-stop gradient behind the pane sells it and a flat brand color does not. Two shapes are also worth planning for before you commit: a non-rectangular pane wants a clip path on the filtered element rather than a rounded wrapper, and a glass tooltip cannot pass the blur down into a border-trick arrow — the arrow stays opaque and gives the illusion away.

What generators skip is legibility, and it is the part that decides whether the design reaches production. A pane is measured against one fixed screenshot, a 6:1 is reported, and then the page ships with a carousel underneath and the label disappears over the light frame. The honest figure is the floor: the tint composited over the lightest possible backdrop and over the darkest, whichever reads worse. Raising tint opacity is the cheapest repair and it costs the effect the least at low blur, where the eye is reading the frosting rather than the transparency. If the answer turns out to be that the surface needs more separation than translucency can give it, the soft-UI approach solves the same 2020-era problem from the opposite direction, with an opaque surface and two shadows instead of one filter.

Where the pane is rendered

Every number on this page is worked out by JavaScript running in the tab you are reading it in. Nothing you type, paste or open is uploaded, logged or kept, which is also why the tools carry on working after you disconnect from the network.

The four scenes behind the pane are CSS gradients declared in this page's own stylesheet, not photographs pulled from an image host, so the preview is byte-for-byte the same for everyone and there is no file involved to send anywhere.