π What Is background-blend-mode?
The background-blend-mode property controls how multiple background layers blend with each other and with the elementβs background color β using the same blending modes found in Photoshop and digital art tools.
It works when an element has multiple backgrounds (e.g., gradients + images). This property creates visually striking effects like overlays, color grading, artistic image styling, and cinematic UI backgrounds. π¬β¨
π§© Basic Syntax
Syntax
background-blend-mode: normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity;π¨ When Does background-blend-mode Work?
- You must have 2 or more backgrounds on the same element
- It blends background layers, not the element with surrounding content
- Order of backgrounds matters (first = topmost)
π§ͺ Basic Example
Simple blend
.hero {
background-image:
url(hero.jpg),
linear-gradient(to bottom, #0008, #0008);
background-blend-mode: overlay;
}β Gradient darkens the image for better text contrast.
π― How Blending Works
Blending happens between each pair of overlapping backgrounds:
- Top background blends with the one below it
- Then that result blends with the next background
- Finally blends with background-color (if present)
π¦ Multiple Background Example
Multiply blend
.card {
background-image:
url(texture.png),
linear-gradient(120deg, red, blue);
background-blend-mode: multiply;
}β Creates a vivid colorized effect with realistic shading.
π All Blend Modes & Their Effects
| Mode | Description |
|---|---|
| normal | No blending |
| multiply | Darkens β rich, deep tones |
| screen | Lightens β opposite of multiply |
| overlay | High contrast mix of multiply + screen |
| darken | Chooses darker pixel |
| lighten | Chooses lighter pixel |
| color-dodge | Brightens underlying layers intensely |
| color-burn | Dark, burned-in contrast |
| hard-light | Vivid contrast (Photoshop-like) |
| soft-light | Subtle artistic lighting |
| difference | High-contrast inverted color effects |
| exclusion | Softer alternative to difference |
| hue | Uses hue of top layer |
| saturation | Uses saturation of top layer |
| color | Uses color of top layer |
| luminosity | Uses brightness of top layer |
π§ͺ Example: Darkened Hero Image
Overlay effect
.hero {
background-image:
url(hero.jpg),
linear-gradient(to top, rgba(0,0,0,0.6), transparent);
background-blend-mode: darken;
}β Excellent for readable hero text.
π₯ Example: Vivid Color Overlay
color-burn / color-dodge
.poster {
background-image:
url(poster.jpg),
radial-gradient(circle, gold, crimson);
background-blend-mode: color-burn;
}β Great for album covers, posters, creative UIs.
π Example: Soft-Lighting Photo Frame
soft-light
.photo {
background-image:
url(portrait.jpg),
linear-gradient(135deg, #fff3, #0003);
background-blend-mode: soft-light;
}β Adds subtle light diffusion for a professional look.
πΌοΈ Example: Multiple Layers + Texture
Complex blend
.texture-card {
background-image:
url(texture.png),
url(photo.jpg),
linear-gradient(130deg, #005, #500);
background-blend-mode: multiply, overlay, normal;
}β Each blend mode applies to its corresponding background layer.
π οΈ animation + blend-mode
Animated blend
@keyframes fadeBlend {
0% { background-blend-mode: multiply; }
100% { background-blend-mode: screen; }
}
.card {
animation: fadeBlend 2s infinite alternate;
}Note
β οΈ Important Notes
- Requires at least two backgrounds
- Image transparency affects blending results
- Use mix-blend-mode to blend the element with elements behind it
- Use background-blend-mode to blend background layers inside the element
- Effects vary depending on background textures and colors
π Debugging Tips
- If no effect appears β ensure multiple backgrounds exist
- Try swapping background order
- Adjust opacity in gradients (use rgba/hsla colors)
- Reduce file size for performance when blending images
π Browser Support
- β Chrome
- β Firefox
- β Safari
- β Edge