CSS Portal

CSS <blend-mode> Data Type

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The <blend-mode> CSS data type defines how an element’s content should blend with the content behind it. It is primarily used in conjunction with the mix-blend-mode and background-blend-mode properties, allowing designers to create visual effects that combine colors and layers in sophisticated ways. Unlike simple opacity, which only makes an element transparent, <blend-mode> allows for complex interactions such as darkening, lightening, or multiplying colors depending on the underlying layers.

This data type includes multiple blend modes, such as multiply, screen, overlay, darken, lighten, and color-dodge, among others. Each mode changes the way colors are calculated between overlapping elements. For example, multiply multiplies the background and foreground colors, resulting in a darker color, while screen does the opposite, producing a lighter effect. These blend modes are similar to those found in image editing software like Photoshop, making them useful for web designers looking to replicate artistic effects directly in the browser.

In practical use, <blend-mode> can be applied to both text and graphical elements. For instance, using it on an image inside a div or img can create visually engaging compositions with background colors or other layered content. It works particularly well in conjunction with CSS filters, gradients, or animations to enhance dynamic visual presentations.

Example:

div {
  background-color: #ffcc00;
  mix-blend-mode: multiply; /* uses <blend-mode> */
  width: 200px;
  height: 200px;
}

img {
  mix-blend-mode: screen; /* uses <blend-mode> */
  width: 200px;
  height: 200px;
}
<div>
  <img src="example.jpg" alt="Example Image">
</div>

In this example, the div’s yellow background blends with the image according to the mix-blend-mode rules, creating a new composite color where the two overlap. The <blend-mode> data type offers designers fine control over visual layering effects without requiring complex image editing, making it a versatile tool for modern web design.

Syntax

<blend-mode> = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity

Values

  • normalThis is the default attribute which specifies no blending. The blending formula simply selects the source color.
  • multiplyThe source color is multiplied by the destination color and replaces the destination. The resultant color is always at least as dark as either the source or destination color. Multiplying any color with black results in black. Multiplying any color with white preserves the original color.
  • screenMultiplies the complements of the backdrop and source color values, then complements the result. The result color is always at least as light as either of the two constituent colors. Screening any color with white produces white; screening with black leaves the original color unchanged. The effect is similar to projecting multiple photographic slides simultaneously onto a single screen.
  • overlayMultiplies or screens the colors, depending on the backdrop color value. Source colors overlay the backdrop while preserving its highlights and shadows. The backdrop color is not replaced but is mixed with the source color to reflect the lightness or darkness of the backdrop.
  • darkenSelects the darker of the backdrop and source colors. The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.
  • lightenSelects the lighter of the backdrop and source colors. The backdrop is replaced with the source where the source is lighter; otherwise, it is left unchanged.
  • color-dodgeBrightens the backdrop color to reflect the source color. Painting with black produces no changes.
  • color-burnDarkens the backdrop color to reflect the source color. Painting with white produces no change.
  • hard-lightMultiplies or screens the colors, depending on the source color value. The effect is similar to shining a harsh spotlight on the backdrop.
  • soft-lightDarkens or lightens the colors, depending on the source color value. The effect is similar to shining a diffused spotlight on the backdrop.
  • differenceSubtracts the darker of the two constituent colors from the lighter color. Painting with white inverts the backdrop color; painting with black produces no change.
  • exclusionProduces an effect similar to that of the Difference mode but lower in contrast. Painting with white inverts the backdrop color; painting with black produces no change.
  • hueCreates a color with the hue of the source color and the saturation and luminosity of the backdrop color.
  • saturationCreates a color with the saturation of the source color and the hue and luminosity of the backdrop color. Painting with this mode in an area of the backdrop that is a pure gray (no saturation) produces no change.
  • colorCreates a color with the hue and saturation of the source color and the luminosity of the backdrop color. This preserves the gray levels of the backdrop and is useful for coloring monochrome images or tinting color images.
  • luminosityCreates a color with the luminosity of the source color and the hue and saturation of the backdrop color. This produces an inverse effect to that of the Color mode.

Example

<div class="demo">
<h1>CSS &lt;blend-mode&gt; examples</h1>

<section class="mix-examples">
<h2>mix-blend-mode</h2>
<div class="photo" role="img" aria-label="Sample photo used to demonstrate blend modes"></div>

<div class="swatches">
<div class="swatch multiply">Multiply</div>
<div class="swatch screen">Screen</div>
<div class="swatch overlay">Overlay</div>
<div class="swatch difference">Difference</div>
</div>
</section>

<section class="background-examples">
<h2>background-blend-mode</h2>
<div class="bg-grid">
<div class="bg-card normal">normal</div>
<div class="bg-card multiply-bg">multiply</div>
<div class="bg-card overlay-bg">overlay</div>
</div>
</section>
</div>
:root {
    --card-radius: 12px;
    --card-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    --photo-url: url('https://images.unsplash.com/photo-1501785888041-af3ef285b470?auto=format&fit=crop&w=1200&q=80');
}

* { box-sizing: border-box; }

body {
    margin: 32px;
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    color: #0f172a;
}

.demo {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 28px;
}

h1 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 600;
}

h2 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #334155;
}

/* mix-blend-mode demo */
.photo {
    width: 640px;
    height: 360px;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    background-image: var(--photo-url);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.swatches {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.swatch {
    width: 140px;
    height: 88px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(2,6,23,0.08);
    cursor: default;
    transition: transform 200ms ease;
}

.swatch:hover { transform: translateY(-6px); }

/* each swatch is placed on top of the photo to show mix-blend-mode */
.multiply,
.screen,
.overlay,
.difference { position: relative; margin-top: -140px; }

.multiply { background: #ef4444; mix-blend-mode: multiply; color: #fff; }
.screen   { background: #10b981; mix-blend-mode: screen; color: #052029; }
.overlay  { background: #f59e0b; mix-blend-mode: overlay; color: #102027; }
.difference { background: #3b82f6; mix-blend-mode: difference; color: #fff; }

/* background-blend-mode demo */
.bg-grid {
    display: flex;
    gap: 18px;
    align-items: stretch;
}

.bg-card {
    flex: 1;
    min-width: 180px;
    height: 140px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: white;
    box-shadow: var(--card-shadow);
    text-transform: capitalize;
}

.bg-card.normal {
    background-image: linear-gradient(135deg, rgba(59,130,246,0.75), rgba(99,102,241,0.6)), var(--photo-url);
    background-size: cover;
    background-position: center;
    background-blend-mode: normal;
}

.bg-card.multiply-bg {
    background-image: linear-gradient(135deg, rgba(239,68,68,0.75), rgba(245,158,11,0.6)), var(--photo-url);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
}

.bg-card.overlay-bg {
    background-image: linear-gradient(135deg, rgba(16,185,129,0.75), rgba(59,130,246,0.5)), var(--photo-url);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

/* responsive */
@media (max-width: 820px) {
    .photo { width: 100%; height: 220px; }
    .swatches { gap: 10px; }
    .swatch { width: 120px; height: 72px; }
    .bg-grid { flex-direction: column; }
}

Browser Support

The following information will show you the current browser support for the CSS blend-mode data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.

This data type is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 2nd January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!