CSS Filter Playground
Apply blur, brightness, contrast, hue-rotate, and more. Combine filters and copy the CSS.
How to Use the CSS Filter Playground
- Choose a mode — Combined lets you stack multiple filters, Single focuses on one filter, Backdrop demonstrates the frosted glass effect, and Presets give you instant Instagram-style filters.
- Drag the sliders — Each slider controls a filter function. Changes apply instantly to the preview.
- Reset individual filters — Click the ↺ icon next to any filter label to reset just that value.
- Copy the CSS — Click Copy to get the filter property declaration. For backdrop mode, you also get the backdrop-filter value.
CSS Filter Functions Explained
The filter property accepts one or more filter functions that are applied sequentially from left to right. Each function modifies the visual output of the element. They work on any element including images, videos, divs, and SVGs.
Available Filter Functions
- blur(px) — Applies a Gaussian blur. Higher values create a more out-of-focus effect. Best used on background decorations, not on text.
- brightness(%) — 100% is normal. 0% = black, 200% = double brightness. Useful for hover effects on images and dark mode adjustments.
- contrast(%) — 100% is normal. 0% = flat gray, 200% = very high contrast. Useful for creating graphic poster effects.
- grayscale(%) — 0% = full color, 100% = completely grayscale. Often used for disabled states or hover effects that reveal color.
- hue-rotate(deg) — Rotates the hue of all colors in the element. 0deg = original, 180deg = opposite hues. Cycling 0-360 creates a rainbow animation.
- invert(%) — 0% = normal, 100% = fully inverted colors (like a photo negative). 50% produces a flat grey.
- opacity(%) — Similar to the opacity property, but composited differently. When used inside filter, it is applied after other filters.
- saturate(%) — 0% = grayscale, 100% = normal, 200% = double saturation. Great for dramatic color effects and hover reveals.
- sepia(%) — 100% gives a warm brown-tone vintage photo look. Combine with brightness and contrast for authentic film effects.
Creating Instagram-Style Presets
Vintage: filter: sepia(0.4) brightness(1.1) contrast(1.1) saturate(0.8);
B&W: filter: grayscale(1) contrast(1.1);
Warm: filter: sepia(0.25) saturate(1.4) brightness(1.05);
Cool: filter: hue-rotate(200deg) saturate(0.9) brightness(1.05);
Backdrop Filter and Frosted Glass
backdrop-filter applies filter effects to the area behind an element. The element itself must have a semi-transparent or transparent background for the effect to show through. This is the technique behind iOS-style frosted glass modals, nav bars, and card overlays. Example: backdrop-filter: blur(10px); background: rgba(255,255,255,0.2);. Add -webkit-backdrop-filter for Safari support. For more CSS design tools, explore the CSS Animation Generator or the CSS Clip Path Editor.
Filter vs. SVG Filters
CSS filter functions are shorthand for common SVG filter effects. Under the hood, blur maps to feGaussianBlur, brightness maps to feComponentTransfer, and so on. For advanced effects not covered by CSS filters — such as drop shadows that follow element shape (not bounding box), color matrix transformations, displacement maps, or morphology — use the filter: url(#svg-filter-id) syntax referencing an SVG filter definition. CSS filters cover 95% of common design needs with much simpler syntax.
Frequently Asked Questions
backdrop-filter: blur(10px) combined with a semi-transparent background: background: rgba(255,255,255,0.2). The backdrop-filter blurs whatever is behind the element. Add -webkit-backdrop-filter for Safari compatibility.