CSS Blend Modes Reference

All mix-blend-mode and background-blend-mode values with compositing math.

Reference for CSS blend mode values with the W3C compositing formula, visual effect and category, plus a live single-channel calculator applying the real blend math to a backdrop and source.

What is the difference between mix-blend-mode and background-blend-mode?

mix-blend-mode blends an element with whatever is painted behind it in the page (its backdrop). background-blend-mode blends a single element's own multiple background layers (and background-color) with each other, without affecting other elements.

How colours combine when they overlap

CSS blend modes control the maths used when one layer is composited over another — the same Multiply, Screen and Overlay modes you know from image editors. They power mix-blend-mode (blend an element with the page behind it) and background-blend-mode (blend a box’s own background layers). This reference lists every value with its real W3C compositing formula and effect, plus a calculator that applies the formula to a single colour channel.

How it works

Separable modes work per channel on values normalised to the 0–1 range. A few core formulas, using Cb for backdrop and Cs for source:

multiply:    B = Cb × Cs
screen:      B = Cb + Cs − Cb × Cs
overlay:     B = hard-light(Cs, Cb)
difference:  B = |Cb − Cs|
exclusion:   B = Cb + Cs − 2 × Cb × Cs

The calculator takes 0–255 inputs, normalises to 0–1, applies the exact formula (including the piecewise soft-light and hard-light definitions and the divide-by-zero guards in color-burn/color-dodge), then scales back to 0–255. The four non-separable modes — hue, saturation, color, luminosity — recombine HSL components of the whole colour and so cannot be reduced to a single channel; the tool flags those rather than returning a wrong number.

Tips and notes

  • multiply always darkens, screen always lightens — white and black are their neutrals.
  • overlay/hard-light are the same formula with operands swapped.
  • Non-separable modes (hue, saturation, color, luminosity) work in HSL, not per channel.
  • mix-blend-mode on a non-isolate parent can blend with siblings — wrap in isolation: isolate to scope it.