They are perfect for hero images, cards, galleries, and backgrounds without editing the image in Photoshop or Figma.
filter is a CSS property that visually processes an element (often an image).grayscale + blur).100%) or unit values (like 5px).Use the filter property with one or more filter functions:
/* Apply a single filter function */
selector {
filter: filter-function(value);
}
/* Apply multiple filters at once (executed left to right) */
selector {
filter: filter-function1(value1) filter-function2(value2);
}
grayscale(%) – converts image to black and white.blur(px) – softens the image (like a Gaussian blur).brightness(%) – increases or decreases overall brightness.contrast(%) – adjusts the difference between light and dark areas.sepia(%) – gives a warm, vintage brown tone.opacity(%) – controls transparency (similar to opacity property).
/* Different filters applied to different images */
img.grayscale {
filter: grayscale(100%);
}
img.blur {
filter: blur(3px);
}
img.brightness {
filter: brightness(150%);
}
img.contrast {
filter: contrast(180%);
}
img.sepia {
filter: sepia(80%);
}
img.multiple {
filter: grayscale(60%) blur(2px) brightness(120%);
}
Below is the same image with different filter effects applied. (The filters here are applied using inline styles to keep the demo self-contained.)
Scroll horizontally if needed. Each image uses a different filter so you can see how the effect changes the mood.
Notice how grayscale and sepia change the mood, while brightness and contrast change how strong and vivid the colors appear. Combining filters gives you full creative control.
A common pattern is to show images in grayscale and remove the filter on hover so the image “comes alive”.
/* Start in grayscale and reveal color on hover */
.gallery img {
filter: grayscale(100%);
transition: filter 0.3s ease;
}
.gallery img:hover {
filter: none;
}
grayscale or sepia to create classy, minimalist portfolio galleries.blur to background images to keep text in the foreground readable.brightness(110%) contrast(105%)) to enhance, not destroy, image quality.sepia for a vintage look.blur, brightness, and contrast to highlight a call-to-action area.